changeset 8:9262f801d739 draft

Uploaded
author bgruening
date Mon, 13 Jan 2014 09:28:44 -0500
parents 59b3b6ce10bb
children 5be8af51780d
files EDeN_nearest_neighbor.xml EDeN_test.xml EDeN_train.xml datatypes_conf.xml eden.py
diffstat 5 files changed, 34 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/EDeN_nearest_neighbor.xml	Tue Oct 29 11:07:49 2013 -0400
+++ b/EDeN_nearest_neighbor.xml	Mon Jan 13 09:28:44 2014 -0500
@@ -14,12 +14,6 @@
         --file_type "SPARSE_VECTOR"
         --binary_file_type
 
-        @kernel_type_options@
-        --graph_type $graph_type
-        @input_smooth_conditional@
-
-        @normalization_kernel_hash_radius_dist_vertex@
-
         --output_directory_path \$tmp_dir
 
 
--- a/EDeN_test.xml	Tue Oct 29 11:07:49 2013 -0400
+++ b/EDeN_test.xml	Mon Jan 13 09:28:44 2014 -0500
@@ -14,12 +14,6 @@
 
         --model_file_name $model_infile
 
-        @kernel_type_options@
-
-        --graph_type $graph_type
-
-        @normalization_kernel_hash_radius_dist_vertex@
-
         --output_directory_path \$tmp_dir
         --minimal_output 
 
--- a/EDeN_train.xml	Tue Oct 29 11:07:49 2013 -0400
+++ b/EDeN_train.xml	Mon Jan 13 09:28:44 2014 -0500
@@ -27,12 +27,16 @@
         --topological_regularization_num_neighbors $topological_regularization_num_neighbors
         --topological_regularization_decay_rate $topological_regularization_decay_rate
 
-        --num_iterations $num_iterations
-        --threshold $threshold
-        --only_positive $only_positive
-        --only_negative $only_negative
+        --random_seed $random_seed
 
-        --random_seed $random_seed
+        ## only if it is semisupervised
+        #if $supervised_opts.supervised_opts_selector != 'non':
+            --num_iterations $supervised_opts.num_iterations
+            --threshold $supervised_opts.threshold
+            --only_positive $supervised_opts.only_positive
+            --only_negative $supervised_opts.only_negative
+        #end if
+
 
     </command>
     <inputs>
@@ -43,16 +47,7 @@
             <validator type="in_range" min="1" />
         </param>
         <param name="lambda" type="text" value="1e-4" label="lambda, Stochastic gradient descend algorithm." help="" />
-
-        <!-- Semi-supervised-settings -->
-        <param name="threshold" type="float" value="1.0" label="Top and low quantile" 
-            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.">
-            <validator type="in_range" min="0.0" />
-        </param>
-        <param name="num_iterations" type="integer" value="3" label="Number of iterations" />
-        <param name="only_negative" type="boolean" label="Induce only negative class instances." truevalue="--only_negative" falsevalue="" checked="false" />
-        <param name="only_positive" type="boolean" label="Induce only positive class instances." truevalue="--only_positive" falsevalue="" checked="false" />
-
+        <param name="random_seed" type="integer" value="1" label="Random Seed" help="" />
 
         <param name="topological_regularization_decay_rate" type="float" value="0.01" label="Topological regularization decay rate">
             <validator type="in_range" min="0.0" />
@@ -64,8 +59,24 @@
             <validator type="in_range" min="0" />
         </param>
 
-        <param name="random_seed" type="integer" value="1" label="Random Seed" help="" />
-
+        <conditional name="supervised_opts">
+            <param name="supervised_opts_selector" type="select" label="Type of the Kernel">
+                <option value="non">non supervised leraning</option>
+                <option value="supervised">supervised learning</option>
+            </param>
+            <when value="non">
+            </when>
+            <when value="">
+                <!-- Semi-supervised-settings -->
+                <param name="threshold" type="float" value="1.0" label="Top and low quantile" 
+                    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.">
+                    <validator type="in_range" min="0.0" />
+                </param>
+                <param name="num_iterations" type="integer" value="3" label="Number of iterations" />
+                <param name="only_negative" type="boolean" label="Induce only negative class instances." truevalue="--only_negative" falsevalue="" checked="false" />
+                <param name="only_positive" type="boolean" label="Induce only positive class instances." truevalue="--only_positive" falsevalue="" checked="false" />
+            </when>
+        </conditional>
     </inputs>
     <outputs>
         <data format="txt" name="model_outfile" label="Train Model from ${on_string}"/>
--- a/datatypes_conf.xml	Tue Oct 29 11:07:49 2013 -0400
+++ b/datatypes_conf.xml	Mon Jan 13 09:28:44 2014 -0500
@@ -4,7 +4,7 @@
         <datatype_file name="eden.py"/>
     </datatype_files>
     <registration>
-        <datatype extension="gspan" type="galaxy.datatypes.eden:Gspan" mimetype="application/octet-stream" subclass="True" display_in_upload="false"/>
-        <datatype extension="sparsevector" type="galaxy.datatypes.eden:SparseVector" mimetype="application/octet-stream" subclass="True" display_in_upload="false"/>
+        <datatype extension="gspan" type="galaxy.datatypes.eden:Gspan" mimetype="application/octet-stream" display_in_upload="True"/>
+        <datatype extension="sparsevector" type="galaxy.datatypes.eden:SparseVector" mimetype="application/octet-stream" display_in_upload="True"/>
     </registration>
 </datatypes>
--- a/eden.py	Tue Oct 29 11:07:49 2013 -0400
+++ b/eden.py	Mon Jan 13 09:28:44 2014 -0500
@@ -1,11 +1,11 @@
 """
-EDeN filetypes
+    EDeN filetypes
 """
 
-from galaxy.datatypes.data import Binary
+from galaxy.datatypes.tabular import Tabular
 
 
-class Gspan( Binary ):
+class Gspan( Tabular ):
     """Class describing an gSpan file"""
     file_ext = "gspan"
 
@@ -22,7 +22,7 @@
         except:
             return "Binary gSpan file (%s)" % ( data.nice_size( dataset.get_size() ) )
 
-class SparseVector( Binary ):
+class SparseVector( Tabular ):
     """Class describing an SparseVector file"""
     file_ext = "sparsevector"