view fitted_model_eval.xml @ 7:e00c1c9d206b draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
author bgruening
date Tue, 13 Apr 2021 21:58:11 +0000
parents fa1471b6c095
children 8e7622bf46e3
line wrap: on
line source

<tool id="sklearn_fitted_model_eval" name="Evaluate a Fitted Model" version="@VERSION@" profile="20.05">
    <description>using a new batch of labeled data</description>
    <macros>
        <import>main_macros.xml</import>
        <import>keras_macros.xml</import>
    </macros>
    <expand macro="python_requirements" />
    <expand macro="macro_stdio" />
    <version_command>echo "@VERSION@"</version_command>
    <command>
        <![CDATA[
        export HDF5_USE_FILE_LOCKING='FALSE';
        python '$__tool_directory__/fitted_model_eval.py'
            --inputs '$inputs'
            --infile_estimator '$infile_estimator'
            --outfile_eval '$outfile_eval'
            --infile_weights '$infile_weights'
            --infile1 '$input_options.infile1'
            --infile2 '$input_options.infile2'
        ]]>
    </command>
    <configfiles>
        <inputs name="inputs" />
    </configfiles>
    <inputs>
        <param name="infile_estimator" type="data" format="zip" label="Choose the dataset containing pipeline/estimator object" />
        <param name="infile_weights" type="data" format="h5" optional="true" label="Choose the dataset containing weights for the estimator above" help="Optional. For deep learning only." />
        <expand macro="scoring_selection" />
        <conditional name="input_options">
            <expand macro="data_input_options" />
            <when value="tabular">
                <expand macro="samples_tabular" label1="Dataset containing features:" multiple1="true" multiple2="false" />
            </when>
            <when value="sparse">
                <expand macro="sparse_target" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" name="outfile_eval" />
    </outputs>
    <tests>
        <test>
            <param name="infile_estimator" value="searchCV01" ftype="zip" />
            <conditional name="scoring">
                <param name="primary_scoring" value="r2" />
            </conditional>
            <param name="infile1" value="train_test_split_test01.tabular" ftype="tabular" />
            <param name="header1" value="true" />
            <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" />
            <param name="infile2" value="regression_y_split_test01.tabular" ftype="tabular" />
            <param name="header2" value="true" />
            <param name="col2" value="1" />
            <output name="outfile_eval" file="fitted_model_eval01.tabular" />
        </test>
    </tests>
    <help>
        <![CDATA[
**What it does**

Given a fitted estimator and a labeled dataset, this tool outputs the performances of the fitted estimator on the labeled dataset with selected scorers.

For the estimator, this tool supports fitted sklearn estimators (pickled) and trained deep learning models (model skeleton + weights). For input datasets, it supports the following:

- tabular

- sparse


**Output**

A tabular file containing performance scores,
e.g.:

======== ======== =========
accuracy f1_macro precision
======== ======== =========
 0.8613   0.6759   0.7928
======== ======== =========

        ]]>
    </help>
    <expand macro="sklearn_citation">
        <expand macro="keras_citation" />
        <expand macro="selene_citation" />
    </expand>
</tool>