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>
|
7
|
8 tmp_dir=`mktemp -d -u`;
|
|
9
|
0
|
10 EDeN --action TRAIN
|
|
11
|
|
12 --input_data_file_name $infile
|
|
13 --file_type "SPARSE_VECTOR"
|
|
14 --binary_file_type
|
|
15
|
7
|
16 ##--output_directory_path \$tmp_dir
|
|
17
|
0
|
18 ## TODO: we need a tool that creates such a file, maybe from the metadata of an SDF file
|
|
19 ## target_file_name is a file with 1 or -1 one in each row, indicating the class
|
|
20 --target_file_name $target_infile
|
|
21 --model_file_name $model_outfile
|
|
22
|
|
23 --lambda $lambda ##??? notation?
|
|
24 --epochs $epoch
|
2
|
25
|
0
|
26 --sparsification_num_iterations $sparsification_num_iterations
|
|
27 --topological_regularization_num_neighbors $topological_regularization_num_neighbors
|
|
28 --topological_regularization_decay_rate $topological_regularization_decay_rate
|
|
29
|
|
30 --num_iterations $num_iterations
|
|
31 --threshold $threshold
|
|
32 --only_positive $only_positive
|
|
33 --only_negative $only_negative
|
|
34
|
|
35 --random_seed $random_seed
|
|
36
|
|
37 </command>
|
|
38 <inputs>
|
|
39 <param format="eden_sparse_vector" name="infile" type="data" label="Input Graph" help=""/>
|
2
|
40 <param format="txt" name="target_infile" type="data" label="Target file" help="indicates with -1 and 1 the class"/>
|
0
|
41
|
|
42 <param name="epoch" type="integer" value="10" label="Epoch, Stochastic gradient descend algorithm." help="">
|
|
43 <validator type="in_range" min="1" />
|
|
44 </param>
|
|
45 <param name="lambda" type="text" value="1e-4" label="lambda, Stochastic gradient descend algorithm." help="" />
|
|
46
|
2
|
47 <!-- Semi-supervised-settings -->
|
|
48 <param name="threshold" type="float" value="1.0" label="Top and low quantile"
|
7
|
49 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.">
|
2
|
50 <validator type="in_range" min="0.0" />
|
|
51 </param>
|
7
|
52 <param name="num_iterations" type="integer" value="3" label="Number of iterations" />
|
2
|
53 <param name="only_negative" type="boolean" label="Induce only negative class instances." truevalue="--only_negative" falsevalue="" checked="false" />
|
|
54 <param name="only_positive" type="boolean" label="Induce only positive class instances." truevalue="--only_positive" falsevalue="" checked="false" />
|
|
55
|
|
56
|
7
|
57 <param name="topological_regularization_decay_rate" type="float" value="0.01" label="Topological regularization decay rate">
|
2
|
58 <validator type="in_range" min="0.0" />
|
|
59 </param>
|
|
60 <param name="topological_regularization_num_neighbors" type="integer" value="0" label="Topological regularization number of neighbors">
|
|
61 <validator type="in_range" min="0" />
|
|
62 </param>
|
|
63 <param name="sparsification_num_iterations" type="integer" value="0" label="Sparsification number of iterations">
|
|
64 <validator type="in_range" min="0" />
|
|
65 </param>
|
|
66
|
7
|
67 <param name="random_seed" type="integer" value="1" label="Random Seed" help="" />
|
2
|
68
|
0
|
69 </inputs>
|
|
70 <outputs>
|
|
71 <data format="txt" name="model_outfile" label="Train Model from ${on_string}"/>
|
|
72 </outputs>
|
|
73 <tests>
|
|
74 <test>
|
|
75 <param name="infile" value="3_molceuls.sdf" />
|
|
76 <output name="outfile" file="3_molecules.gspan" />
|
|
77 </test>
|
|
78 </tests>
|
|
79 <help>
|
|
80
|
|
81 .. class:: infomark
|
|
82
|
|
83 **What it does**
|
|
84
|
|
85 The linear model is induced using the accelerated stochastic gradient descent technique by Léon Bottou and Yann LeCun.
|
|
86 When the target information is 0, a self-training algorithm is used to impute a positive or negative class to the unsupervised instances.
|
|
87 If the target information is imbalanced a minority class resampling technique is used to rebalance the training set.
|
|
88
|
7
|
89 @references@
|
0
|
90
|
7
|
91 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'',
|
|
92 Advances in Neural Information Processing Systems 16, Edited by Sebastian Thrun, Lawrence Saul and Bernhard Schölkopf, MIT Press, Cambridge, MA, 2004.
|
0
|
93
|
|
94
|
|
95
|
|
96 </help>
|
|
97 </tool>
|