Comparing results of two classificators
I'm just beginning to use RM and find that I like it a lot.
Most of the time I use mining for classification. How do I run, say a Logistic Regression and an SVM on the same dataset and compare the results? I know there is an ROCComparator, but what would the chain need to look like?
Most of the time I use mining for classification. How do I run, say a Logistic Regression and an SVM on the same dataset and compare the results? I know there is an ROCComparator, but what would the chain need to look like?
Find more posts tagged with
Sort by:
1 - 4 of
41
Hi again,
Here's some code to do that sort of stuff....
I've just bashed this together rather swiftly ( a big plus for RM ), and wiser heads than mine can do it much better, but you get the idea.
Have fun improving it!
Here's some code to do that sort of stuff....
<operator name="Root" class="Process" expanded="yes">
<parameter key="logverbosity" value="warning"/>
<parameter key="random_seed" value="2000"/>
<operator name="ExampleSetGenerator" class="ExampleSetGenerator">
<parameter key="target_function" value="random dots classification"/>
<parameter key="number_examples" value="500"/>
<parameter key="number_of_attributes" value="2"/>
<parameter key="attributes_lower_bound" value="0.0"/>
<parameter key="attributes_upper_bound" value="25.0"/>
</operator>
<operator name="XValidation" class="XValidation" expanded="no">
<parameter key="keep_example_set" value="true"/>
<parameter key="create_complete_model" value="true"/>
<parameter key="sampling_type" value="shuffled sampling"/>
<operator name="LibSVMLearner" class="LibSVMLearner">
<parameter key="keep_example_set" value="true"/>
<parameter key="gamma" value="1.0"/>
<list key="class_weights">
</list>
</operator>
<operator name="OperatorChain" class="OperatorChain" expanded="yes">
<operator name="ModelApplier" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="Performance" class="Performance">
</operator>
</operator>
</operator>
<operator name="ModelWriter" class="ModelWriter">
<parameter key="model_file" value="SVM"/>
</operator>
<operator name="XValidation (2)" class="XValidation" expanded="no">
<parameter key="keep_example_set" value="true"/>
<parameter key="create_complete_model" value="true"/>
<parameter key="sampling_type" value="shuffled sampling"/>
<operator name="LinearRegression" class="LinearRegression">
</operator>
<operator name="OperatorChain (2)" class="OperatorChain" expanded="yes">
<operator name="ModelApplier (2)" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="Performance (2)" class="Performance">
</operator>
</operator>
</operator>
<operator name="ModelWriter (2)" class="ModelWriter">
<parameter key="model_file" value="LR"/>
</operator>
<operator name="ROCComparator" class="ROCComparator" expanded="yes">
<operator name="SVM" class="ModelLoader">
<parameter key="model_file" value="SVM"/>
</operator>
<operator name="LR" class="ModelLoader">
<parameter key="model_file" value="LR"/>
</operator>
</operator>
</operator>
I've just bashed this together rather swiftly ( a big plus for RM ), and wiser heads than mine can do it much better, but you get the idea.
Have fun improving it!
The answer to your question is like this .... Pretty handy, so thanks for bringing it to our attention.