|
0
|
1 <tool id="bg_eden_train" name="EDeN Train" version="0.1">
|
|
|
2 <description></description>
|
|
7
|
3 <macros>
|
|
|
4 <import>eden_macros.xml</import>
|
|
|
5 </macros>
|
|
|
6 <expand macro="requirements" />
|
|
0
|
7 <command>
|
|
|
8 EDeN --action TRAIN
|
|
|
9
|
|
|
10 --input_data_file_name $infile
|
|
|
11 --file_type "SPARSE_VECTOR"
|
|
|
12 --binary_file_type
|
|
|
13
|
|
|
14 ## TODO: we need a tool that creates such a file, maybe from the metadata of an SDF file
|
|
|
15 ## target_file_name is a file with 1 or -1 one in each row, indicating the class
|
|
|
16 --target_file_name $target_infile
|
|
|
17 --model_file_name $model_outfile
|
|
|
18
|
|
|
19 --lambda $lambda ##??? notation?
|
|
|
20 --epochs $epoch
|
|
2
|
21
|
|
0
|
22 --sparsification_num_iterations $sparsification_num_iterations
|
|
|
23 --topological_regularization_num_neighbors $topological_regularization_num_neighbors
|
|
|
24 --topological_regularization_decay_rate $topological_regularization_decay_rate
|
|
|
25
|
|
8
|
26 --random_seed $random_seed
|
|
0
|
27
|
|
8
|
28 ## only if it is semisupervised
|
|
|
29 #if $supervised_opts.supervised_opts_selector != 'non':
|
|
|
30 --num_iterations $supervised_opts.num_iterations
|
|
|
31 --threshold $supervised_opts.threshold
|
|
|
32 --only_positive $supervised_opts.only_positive
|
|
|
33 --only_negative $supervised_opts.only_negative
|
|
|
34 #end if
|
|
|
35
|
|
0
|
36 </command>
|
|
|
37 <inputs>
|
|
10
|
38 <param format="eden_sparse_vector" name="infile" type="data" label="Input File" help="Sparse Vector file, created with EDeN convert."/>
|
|
2
|
39 <param format="txt" name="target_infile" type="data" label="Target file" help="indicates with -1 and 1 the class"/>
|
|
0
|
40
|
|
|
41 <param name="epoch" type="integer" value="10" label="Epoch, Stochastic gradient descend algorithm." help="">
|
|
|
42 <validator type="in_range" min="1" />
|
|
|
43 </param>
|
|
|
44 <param name="lambda" type="text" value="1e-4" label="lambda, Stochastic gradient descend algorithm." help="" />
|
|
8
|
45 <param name="random_seed" type="integer" value="1" label="Random Seed" help="" />
|
|
2
|
46
|
|
7
|
47 <param name="topological_regularization_decay_rate" type="float" value="0.01" label="Topological regularization decay rate">
|
|
2
|
48 <validator type="in_range" min="0.0" />
|
|
|
49 </param>
|
|
|
50 <param name="topological_regularization_num_neighbors" type="integer" value="0" label="Topological regularization number of neighbors">
|
|
|
51 <validator type="in_range" min="0" />
|
|
|
52 </param>
|
|
|
53 <param name="sparsification_num_iterations" type="integer" value="0" label="Sparsification number of iterations">
|
|
|
54 <validator type="in_range" min="0" />
|
|
|
55 </param>
|
|
|
56
|
|
8
|
57 <conditional name="supervised_opts">
|
|
|
58 <param name="supervised_opts_selector" type="select" label="Type of the Kernel">
|
|
|
59 <option value="non">non supervised leraning</option>
|
|
|
60 <option value="supervised">supervised learning</option>
|
|
|
61 </param>
|
|
|
62 <when value="non">
|
|
|
63 </when>
|
|
10
|
64 <when value="supervised">
|
|
8
|
65 <!-- Semi-supervised-settings -->
|
|
|
66 <param name="threshold" type="float" value="1.0" label="Top and low quantile"
|
|
|
67 help="Only the top and low quantile will be used as positives and negative instances. A threshold of 1 means that all unsupervised instaces are used in the next phase.">
|
|
|
68 <validator type="in_range" min="0.0" />
|
|
|
69 </param>
|
|
|
70 <param name="num_iterations" type="integer" value="3" label="Number of iterations" />
|
|
|
71 <param name="only_negative" type="boolean" label="Induce only negative class instances." truevalue="--only_negative" falsevalue="" checked="false" />
|
|
|
72 <param name="only_positive" type="boolean" label="Induce only positive class instances." truevalue="--only_positive" falsevalue="" checked="false" />
|
|
|
73 </when>
|
|
|
74 </conditional>
|
|
0
|
75 </inputs>
|
|
|
76 <outputs>
|
|
|
77 <data format="txt" name="model_outfile" label="Train Model from ${on_string}"/>
|
|
|
78 </outputs>
|
|
|
79 <tests>
|
|
|
80 <test>
|
|
|
81 <param name="infile" value="3_molceuls.sdf" />
|
|
|
82 <output name="outfile" file="3_molecules.gspan" />
|
|
|
83 </test>
|
|
|
84 </tests>
|
|
|
85 <help>
|
|
|
86
|
|
|
87 .. class:: infomark
|
|
|
88
|
|
|
89 **What it does**
|
|
|
90
|
|
|
91 The linear model is induced using the accelerated stochastic gradient descent technique by Léon Bottou and Yann LeCun.
|
|
|
92 When the target information is 0, a self-training algorithm is used to impute a positive or negative class to the unsupervised instances.
|
|
|
93 If the target information is imbalanced a minority class resampling technique is used to rebalance the training set.
|
|
|
94
|
|
7
|
95 @references@
|
|
0
|
96
|
|
7
|
97 The code for Stochastic Gradient Descent SVM is adapted from http://leon.bottou.org/projects/sgd. Léon Bottou and Yann LeCun, ''Large Scale Online Learning'',
|
|
|
98 Advances in Neural Information Processing Systems 16, Edited by Sebastian Thrun, Lawrence Saul and Bernhard Schölkopf, MIT Press, Cambridge, MA, 2004.
|
|
0
|
99
|
|
|
100
|
|
|
101
|
|
|
102 </help>
|
|
|
103 </tool>
|