Genrating diagram (Classifcation accuracy vs number of features) How?

talebmuhsintalebmuhsin Member Posts: 4 Contributor I
Hello Everyone,

I am working on some feature selection process using rapidminer. I am actually using forward selection, backward elimination and SVM ranking. my question is how can I generate a diagram that shows the number of selected features against the classier accuracy?

Thanks

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    Hi,

    you can use the process below as a starting point. After the Log to Data operator you can use e.g. the Aggregate operator to transform the log data to your needs.

    Best regards,
    Marius
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.013">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve Sonar" width="90" x="45" y="30">
            <parameter key="repository_entry" value="//Samples/data/Sonar"/>
          </operator>
          <operator activated="true" class="optimize_selection_forward" compatibility="5.3.013" expanded="true" height="94" name="Forward Selection" width="90" x="179" y="30">
            <parameter key="speculative_rounds" value="1"/>
            <process expanded="true">
              <operator activated="true" class="x_validation" compatibility="5.3.013" expanded="true" height="112" name="Validation" width="90" x="45" y="75">
                <description>A cross-validation evaluating a decision tree model.</description>
                <parameter key="use_local_random_seed" value="true"/>
                <process expanded="true">
                  <operator activated="true" class="naive_bayes" compatibility="5.3.013" expanded="true" height="76" name="Naive Bayes" width="90" x="45" y="30"/>
                  <connect from_port="training" to_op="Naive Bayes" to_port="training set"/>
                  <connect from_op="Naive Bayes" from_port="model" to_port="model"/>
                  <portSpacing port="source_training" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                  <portSpacing port="sink_through 1" spacing="0"/>
                </process>
                <process expanded="true">
                  <operator activated="true" class="apply_model" compatibility="5.3.013" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
                    <list key="application_parameters"/>
                  </operator>
                  <operator activated="true" class="performance" compatibility="5.3.013" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
                  <connect from_port="model" to_op="Apply Model" to_port="model"/>
                  <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
                  <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
                  <connect from_op="Performance" 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="sink_averagable 1" spacing="0"/>
                  <portSpacing port="sink_averagable 2" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="extract_macro" compatibility="5.3.013" expanded="true" height="60" name="Extract Macro" width="90" x="179" y="30">
                <parameter key="macro" value="attributeCount"/>
                <parameter key="macro_type" value="number_of_attributes"/>
                <list key="additional_macros"/>
              </operator>
              <operator activated="true" class="provide_macro_as_log_value" compatibility="5.3.013" expanded="true" height="76" name="Provide attributeCount" width="90" x="313" y="30">
                <parameter key="macro_name" value="attributeCount"/>
              </operator>
              <operator activated="true" class="log" compatibility="5.3.013" expanded="true" height="94" name="Log" width="90" x="447" y="75">
                <list key="log">
                  <parameter key="attributeCount" value="operator.Provide attributeCount.value.macro_value"/>
                  <parameter key="Performance" value="operator.Validation.value.performance"/>
                </list>
              </operator>
              <connect from_port="example set" to_op="Validation" to_port="training"/>
              <connect from_op="Validation" from_port="training" to_op="Extract Macro" to_port="example set"/>
              <connect from_op="Validation" from_port="averagable 1" to_op="Log" to_port="through 2"/>
              <connect from_op="Extract Macro" from_port="example set" to_op="Provide attributeCount" to_port="through 1"/>
              <connect from_op="Provide attributeCount" from_port="through 1" to_op="Log" to_port="through 1"/>
              <connect from_op="Log" from_port="through 2" to_port="performance"/>
              <portSpacing port="source_example set" spacing="0"/>
              <portSpacing port="sink_performance" spacing="90"/>
            </process>
          </operator>
          <operator activated="true" class="log_to_data" compatibility="5.3.013" expanded="true" height="94" name="Log to Data" width="90" x="380" y="30">
            <parameter key="log_name" value="Log"/>
          </operator>
          <connect from_op="Retrieve Sonar" from_port="output" to_op="Forward Selection" to_port="example set"/>
          <connect from_op="Forward Selection" from_port="example set" to_op="Log to Data" to_port="through 1"/>
          <connect from_op="Log to Data" from_port="exampleSet" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>
Sign In or Register to comment.