Convert Nominal LABEL to numerical

noah977noah977 Member Posts: 32 Maven
edited November 2018 in Help

I want to train a REGRESSION SVM (nu-SVR) with a sparse data example.

I am able to create the sparse data file easily.  The "label" in this case is a numeric value since we're doing regression.

When I load in the data file RM automatically sets the label as a nominal type.  This then causes the SVM to produce an error since it needs a numeric label for its regression.

I've tried nominal2numeric, but it only seems to work for attributes NOT LABELS.

How can I force RM to treat the labels at numerical (They are number!)



  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Operators ignore special attributes by default. To work on special attributes use the AttributeSubsetPreprocessing Operator with checked "process_special_attributes". Second thing is, that you should use the NominalNumbers2Numerical instead of Nominal2Numerical, since this would not interpret the strings as numbers but creates new numerical values instead.

    This XML fragment should help, if you past it into your process:
       <operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="yes">
            <parameter key="attribute_name_regex" value="label"/>
            <parameter key="condition_class" value="attribute_name_filter"/>
            <parameter key="process_special_attributes" value="true"/>
            <operator name="NominalNumbers2Numerical" class="NominalNumbers2Numerical">
  • Options
    noah977noah977 Member Posts: 32 Maven

    That worked perfectly!

    Thank You!!!!

Sign In or Register to comment.