Hi all,
I'm attempting to loop a subprocess through clusters and continuing the loop if an error occurs. I've put the handle exceptions operator within the loop clusters. It seems however that once an error is thrown, the loop stops. Does anyone have any suggestions on how to alter this so it moves on to the next cluster after hitting an error? I've put some example code below.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="7.0.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.0.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="7.0.001" expanded="true" height="68" name="Retrieve" width="90" x="112" y="136">
<parameter key="repository_entry" value="../data/cfs_hc_plos_one_permuted"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="7.0.001" expanded="true" height="103" name="Filter Examples" width="90" x="313" y="187">
<list key="filters_list">
<parameter key="filters_entry_key" value="ID.does_not_contain.RH"/>
</list>
</operator>
<operator activated="true" class="collect" compatibility="7.0.001" expanded="true" height="68" name="Collect (4)" width="90" x="581" y="340">
<parameter key="unfold" value="true"/>
</operator>
<operator activated="true" class="remember" compatibility="7.0.001" expanded="true" height="68" name="Remember (4)" width="90" x="715" y="340">
<parameter key="name" value="performance_imaging"/>
<parameter key="io_object" value="Collection"/>
</operator>
<operator activated="true" class="multiply" compatibility="7.0.001" expanded="true" height="82" name="Multiply" width="90" x="112" y="442"/>
<operator activated="true" class="set_role" compatibility="7.0.001" expanded="true" height="82" name="Set Role" width="90" x="313" y="391">
<parameter key="attribute_name" value="Label"/>
<parameter key="target_role" value="label"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="select_attributes" compatibility="7.0.001" expanded="true" height="82" name="Select Attributes" width="90" x="514" y="442">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attributes" value="Label|rh_superiortemporal_volume|rh_superiortemporal_thickness|rh_superiortemporal_area|lh_superiorfrontal_volume|lh_superiorfrontal_thickness|lh_superiorfrontal_area|rh_rostralanteriorcingulate_volume|rh_rostralanteriorcingulate_thickness|rh_rostralanteriorcingulate_area|rh_caudalanteriorcingulate_volume|rh_caudalanteriorcingulate_thickness|rh_caudalanteriorcingulate_area|lh_rostralanteriorcingulate_volume|lh_rostralanteriorcingulate_thickness|lh_rostralanteriorcingulate_area|lh_caudalanteriorcingulate_volume|lh_caudalanteriorcingulate_thickness|lh_caudalanteriorcingulate_area|rh_precuneus_volume|rh_precuneus_thickness|rh_precuneus_area|lh_precuneus_volume|lh_precuneus_thickness|lh_precuneus_area|rh_inferiorparietal_volume|rh_inferiorparietal_thickness|rh_inferiorparietal_area|lh_parahippocampal_volume|lh_parahippocampal_thickness|lh_parahippocampal_area|Right_Pallidum|Left_Pallidum|lh_rostralmiddlefrontal_volume|lh_rostralmiddlefrontal_thickness|lh_rostralmiddlefrontal_area|lh_caudalmiddlefrontal_volume|lh_caudalmiddlefrontal_thickness|lh_caudalmiddlefrontal_area|lh_postcentral_volume|lh_postcentral_thickness|lh_postcentral_area|lh_insula_volume|lh_insula_thickness|lh_insula_area|Left_Caudate|Right_Hippocampus|rh_superiorparietal_volume|rh_superiorparietal_thickness|rh_superiorparietal_area|lh_posteriorcingulate_volume|lh_posteriorcingulate_thickness|lh_posteriorcingulate_area|rh_cuneus_volume|rh_cuneus_thickness|rh_cuneus_area|lh_lingual_volume|lh_lingual_thickness|lh_lingual_area|rh_lateraloccipital_volume|rh_lateraloccipital_thickness|rh_lateraloccipital_area"/>
</operator>
<operator activated="true" class="normalize" compatibility="7.0.001" expanded="true" height="103" name="Normalize" width="90" x="648" y="493"/>
<operator activated="true" class="loop_clusters" compatibility="7.0.001" expanded="true" height="82" name="Loop Clusters" width="90" x="916" y="289">
<process expanded="true">
<operator activated="true" class="handle_exception" compatibility="7.0.001" expanded="true" height="82" name="Handle Exception" width="90" x="112" y="238">
<process expanded="true">
<operator activated="true" class="x_validation" compatibility="7.0.001" expanded="true" height="145" name="Imaging_Xval (3)" width="90" x="179" y="187">
<parameter key="leave_one_out" value="true"/>
<process expanded="true">
<operator activated="true" class="featselext:lars" compatibility="1.1.004" expanded="true" height="103" name="Imaging_LARS (3)" width="90" x="112" y="646">
<parameter key="t" value="0.179"/>
</operator>
<operator activated="false" class="featselext:lars" compatibility="1.1.004" expanded="true" height="103" name="LARS (3)" width="90" x="112" y="391">
<parameter key="t" value="0.13891775908006915"/>
</operator>
<operator activated="false" class="select_by_weights" compatibility="7.0.001" expanded="true" height="103" name="Select by Weights (4)" width="90" x="179" y="34">
<parameter key="weight_relation" value="greater"/>
<parameter key="weight" value="0.0"/>
</operator>
<operator activated="false" class="stacking" compatibility="7.0.001" expanded="true" height="68" name="Imaging_Stacking (4)" width="90" x="246" y="238">
<process expanded="true">
<operator activated="true" class="weka:W-SMO" compatibility="7.0.000" expanded="true" height="82" name="W-SMO (5)" width="90" x="179" y="75">
<parameter key="C" value="564620.6623151982"/>
</operator>
<operator activated="true" class="weka:W-J48" compatibility="7.0.000" expanded="true" height="82" name="W-J48 (5)" width="90" x="179" y="255">
<parameter key="C" value="0.5881776942598103"/>
<parameter key="M" value="1.0"/>
</operator>
<operator activated="true" class="support_vector_machine_libsvm" compatibility="7.0.001" expanded="true" height="82" name="SVM (7)" width="90" x="179" y="165">
<parameter key="degree" value="4"/>
<parameter key="C" value="220503.0"/>
<list key="class_weights"/>
</operator>
<connect from_port="training set 1" to_op="W-SMO (5)" to_port="training set"/>
<connect from_port="training set 2" to_op="W-J48 (5)" to_port="training set"/>
<connect from_port="training set 3" to_op="SVM (7)" to_port="training set"/>
<connect from_op="W-SMO (5)" from_port="model" to_port="base model 1"/>
<connect from_op="W-J48 (5)" from_port="model" to_port="base model 2"/>
<connect from_op="SVM (7)" from_port="model" to_port="base model 3"/>
<portSpacing port="source_training set 1" spacing="0"/>
<portSpacing port="source_training set 2" spacing="0"/>
<portSpacing port="source_training set 3" spacing="0"/>
<portSpacing port="source_training set 4" spacing="0"/>
<portSpacing port="sink_base model 1" spacing="0"/>
<portSpacing port="sink_base model 2" spacing="0"/>
<portSpacing port="sink_base model 3" spacing="0"/>
<portSpacing port="sink_base model 4" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="naive_bayes" compatibility="7.0.001" expanded="true" height="82" name="Naive Bayes (8)" width="90" x="112" y="75">
<parameter key="laplace_correction" value="false"/>
</operator>
<connect from_port="stacking examples" to_op="Naive Bayes (8)" to_port="training set"/>
<connect from_op="Naive Bayes (8)" from_port="model" to_port="stacking model"/>
<portSpacing port="source_stacking examples" spacing="0"/>
<portSpacing port="sink_stacking model" spacing="0"/>
</process>
</operator>
<operator activated="false" class="naive_bayes" compatibility="7.0.001" expanded="true" height="82" name="Naive Bayes (9)" width="90" x="112" y="544"/>
<connect from_port="training" to_op="Imaging_LARS (3)" to_port="training set"/>
<connect from_op="Imaging_LARS (3)" from_port="model" to_port="model"/>
<connect from_op="Imaging_LARS (3)" from_port="weights" to_port="through 1"/>
<connect from_op="LARS (3)" from_port="exampleSet" to_op="Select by Weights (4)" to_port="example set input"/>
<connect from_op="LARS (3)" from_port="weights" to_op="Select by Weights (4)" to_port="weights"/>
<connect from_op="Select by Weights (4)" from_port="example set output" to_op="Imaging_Stacking (4)" to_port="training set"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
<portSpacing port="sink_through 2" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="7.0.001" expanded="true" height="82" name="Apply Model (8)" width="90" x="45" y="30">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance" compatibility="7.0.001" expanded="true" height="82" name="Imaging_Performance (4)" width="90" x="246" y="136"/>
<connect from_port="model" to_op="Apply Model (8)" to_port="model"/>
<connect from_port="test set" to_op="Apply Model (8)" to_port="unlabelled data"/>
<connect from_port="through 1" to_port="averagable 2"/>
<connect from_op="Apply Model (8)" from_port="labelled data" to_op="Imaging_Performance (4)" to_port="labelled data"/>
<connect from_op="Imaging_Performance (4)" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="source_through 2" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
<portSpacing port="sink_averagable 3" spacing="0"/>
</process>
</operator>
<operator activated="true" class="recall" compatibility="7.0.001" expanded="true" height="68" name="Recall (3)" width="90" x="313" y="595">
<parameter key="name" value="performance_imaging"/>
<parameter key="io_object" value="Collection"/>
</operator>
<operator activated="true" class="collect" compatibility="7.0.001" expanded="true" height="103" name="Collect (3)" width="90" x="581" y="595">
<parameter key="unfold" value="true"/>
</operator>
<operator activated="true" class="remember" compatibility="7.0.001" expanded="true" height="68" name="Remember (3)" width="90" x="715" y="595">
<parameter key="name" value="performance_imaging"/>
<parameter key="io_object" value="Collection"/>
</operator>
<connect from_port="in 1" to_op="Imaging_Xval (3)" to_port="training"/>
<connect from_op="Imaging_Xval (3)" from_port="averagable 1" to_op="Collect (3)" to_port="input 1"/>
<connect from_op="Recall (3)" from_port="result" to_op="Collect (3)" to_port="input 2"/>
<connect from_op="Collect (3)" from_port="collection" to_op="Remember (3)" to_port="store"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="write_message" compatibility="7.0.001" expanded="true" height="82" name="Write Message" width="90" x="112" y="238">
<parameter key="file" value="/Users/lsevel/Desktop/hc_cfs_errors_imaging.txt"/>
<parameter key="text" value="singular_matrix_error"/>
</operator>
<connect from_port="in 1" to_op="Write Message" to_port="through 1"/>
<connect from_op="Write Message" from_port="through 1" to_port="out 1"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="source_in 2" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<connect from_port="cluster subset" to_op="Handle Exception" to_port="in 1"/>
<connect from_op="Handle Exception" from_port="out 1" to_port="out 1"/>
<portSpacing port="source_cluster subset" spacing="0"/>
<portSpacing port="source_in 1" spacing="0"/>
<portSpacing port="sink_out 1" spacing="0"/>
<portSpacing port="sink_out 2" spacing="0"/>
</process>
</operator>
<operator activated="true" class="recall" compatibility="7.0.001" expanded="true" height="68" name="Recall (4)" width="90" x="983" y="442">
<parameter key="name" value="performance_imaging"/>
<parameter key="io_object" value="Collection"/>
</operator>
<operator activated="true" class="write_as_text" compatibility="7.0.001" expanded="true" height="82" name="Write as Text" width="90" x="1184" y="442">
<parameter key="result_file" value="/Users/lsevel/Desktop/imaging_performance_text.txt"/>
</operator>
<operator activated="true" class="write_as_text" compatibility="7.0.001" expanded="true" height="68" name="Write as Text (4)" width="90" x="1318" y="646">
<parameter key="result_file" value="/Users/lsevel/Desktop/sr_performance_text.txt"/>
</operator>
<operator activated="true" class="write_as_text" compatibility="7.0.001" expanded="true" height="68" name="Write as Text (3)" width="90" x="1318" y="799">
<parameter key="result_file" value="/Users/lsevel/Desktop/imaging_sr_performance_text.txt"/>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Filter Examples" to_port="example set input"/>
<connect from_op="Filter Examples" from_port="example set output" to_op="Multiply" to_port="input"/>
<connect from_op="Collect (4)" from_port="collection" to_op="Remember (4)" to_port="store"/>
<connect from_op="Multiply" from_port="output 1" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
<connect from_op="Select Attributes" from_port="example set output" to_op="Normalize" to_port="example set input"/>
<connect from_op="Normalize" from_port="example set output" to_op="Loop Clusters" to_port="example set"/>
<connect from_op="Recall (4)" from_port="result" to_op="Write as Text" to_port="input 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
</process>
</operator>
</process>