🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Problem with mapping nominal -

User: "andyknownasabu"
New Altair Community Member
Updated by Jocelyn
Dear all,

I'm still struggling with the feature evaluation processing chain also described in my post from yesterday:
<?xml version="1.0" encoding="US-ASCII"?>
<process version="4.3">

  <operator name="Root" class="Process" expanded="yes">
      <operator name="Data Source" class="ArffExampleSource">
          <parameter key="data_file"    value="all_subjects.arff"/>
          <parameter key="id_attribute" value="id"/>
          <parameter key="label_attribute"      value="label"/>
      </operator>
      <operator name="YAGGA2" class="YAGGA2" expanded="yes">
          <parameter key="use_diff"    value="true"/>
          <parameter key="use_max"      value="true"/>
          <parameter key="use_min"      value="true"/>
          <parameter key="use_sin"      value="false"/>
          <parameter key="use_square_roots"    value="true"/>
          <operator name="SimpleValidation" class="SimpleValidation" expanded="yes">
              <parameter key="create_complete_model"    value="true"/>
              <operator name="OperatorChain" class="OperatorChain" expanded="yes">
                  <operator name="Mapping" class="Mapping">
                  </operator>
                  <operator name="LibSVMLearner" class="LibSVMLearner" breakpoints="before">
                      <parameter key="calculate_confidences"    value="true"/>
                      <parameter key="svm_type" value="epsilon-SVR"/>
                  </operator>
              </operator>
              <operator name="Applier Chain" class="OperatorChain" expanded="yes">
                  <operator name="Test" class="ModelApplier">
                      <list key="application_parameters">
                      </list>
                      <parameter key="keep_model"      value="true"/>
                  </operator>
                  <operator name="ClassificationPerformance" class="ClassificationPerformance">
                      <parameter key="keep_example_set" value="true"/>
                      <parameter key="root_mean_squared_error"  value="true"/>
                      <parameter key="root_relative_squared_error"      value="true"/>
                      <parameter key="weighted_mean_precision"  value="true"/>
                      <parameter key="weighted_mean_recall"    value="true"/>
                  </operator>
              </operator>
          </operator>
          <operator name="ProcessLog" class="ProcessLog">
              <parameter key="filename" value="process_log.txt"/>
              <list key="log">
                <parameter key="Generation"    value="operator.YAGGA2.value.generation"/>
                <parameter key="Recall" value="operator.ClassificationPerformance.value.weighted_mean_recall"/>
                <parameter key="Precision"      value="operator.ClassificationPerformance.value.weighted_mean_precision"/>
              </list>
          </operator>
      </operator>
      <operator name="AttributeWeightsWriter" class="AttributeWeightsWriter">
          <parameter key="attribute_weights_file"      value="svm/attribute.wgt"/>
      </operator>
      <operator name="PerformanceWriter" class="PerformanceWriter">
          <parameter key="performance_file"    value="svm/performance.per"/>
      </operator>
      <operator name="AttributeConstructionsWriter" class="AttributeConstructionsWriter">
          <parameter key="attribute_constructions_file" value="svm/attribute.att"/>
      </operator>
  </operator>

</process>
With NaiveBayes or Decision Trees this scheme works fine (despite the error message, see my post from yesterday), however, with LibSVMLearner I run into a problem: This operator requires numerical attributes while ClassificationPerformance requires nominal ones. That's why I added this Mapping operator.

My questions are: 1) Is this the right way to solve this problem? and 2) How do I configure the Mapping operator to map my nominal labels to values 1..n?

Thanks a lot in advance!

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "steffen"
    New Altair Community Member
    Hello

    With NaiveBayes or Decision Trees this scheme works fine (despite the error message, see my post from yesterday), however, with LibSVMLearner I run into a problem: This operator requires numerical attributes while ClassificationPerformance requires nominal ones. That's why I added this Mapping operator.
    You have to select a mode capable for classification. The description says (select operator and press F1)

    This operator supports the SVM types C-SVC and nu-SVC for classification tasks and epsilon-SVR and nu-SVR for regression tasks
    So I would try another mode :).

    In general it is no good idea to transform a classification task (nominal label) into a regression task (numerical label) without justification by domain knowledge

    regards,

    Steffen
    User: "martyns"
    New Altair Community Member
    Unless of course, it works consistently in which case you could start looking for ways to explain more about the domain given that fact.

    ???
    User: "steffen"
    New Altair Community Member
    Yes ... if this consistent behaviour does not happen by chance ... and is not what me and my colleagues call an "artifact", an event reflecting the properties of the involved formulas, not the reality :)