"Error in: Learner (LibSVMLearner)"

darkforce
darkforce New Altair Community Member
edited November 5 in Community Q&A
When I try to run the FeatureSelection.xml, i encountered the following error:

Error in: Learner (LibSVMLearner)
The label attribute (label) must be nominal for C-SVC
Certain learning schemes and algorithms require the label attribute to be nominal. In that case we say that the learning task is classification. Decision trees (ID3, J48, C4.5) are an example of classification learners.

I did not modify anything on thie script, and it is actually adapted from the tutorial guide. Can anyone here help me on this?

Thanks.  :)
Tagged:

Answers

  • haddock
    haddock New Altair Community Member
    I did not modify anything on thie script, and it is actually adapted from the tutorial guide.
    When you say "adapted" what do you mean? The reason I ask is firstly that the FeatureSelection example in the samples works fine for me, and secondly that it does not contain the LibSVM learner, like this..
    <operator name="Root" class="Process" expanded="yes">
        <description text="#ylt#p#ygt# Transformations of the attribute space may ease learning in a way, that simple learning schemes may be able to learn complex functions. This is the basic idea of the kernel trick. But even without kernel based learning schemes the transformation of feature space may be necessary to reach good learning results. #ylt#/p#ygt#  #ylt#p#ygt# RapidMiner offers several different feature selection, construction, and extraction methods. This selection process (the well known forward selection) uses an inner cross validation for performance estimation. This building block serves as fitness evaluation for all candidate feature sets. Since the performance of a certain learning scheme is taken into account we refer to processes of this type as #yquot#wrapper approaches#yquot#.#ylt#/p#ygt#  #ylt#p#ygt#Additionally the process log operator plots intermediate results. You can inspect them online in the Results tab. Please refer to the visualization sample processes or the RapidMiner tutorial for further details.#ylt#/p#ygt#  #ylt#p#ygt# Try the following: #ylt#ul#ygt# #ylt#li#ygt#Start the process and change to #yquot#Result#yquot# view. There can be a plot selected. Plot the #yquot#performance#yquot# against the #yquot#generation#yquot# of the feature selection operator.#ylt#/li#ygt# #ylt#li#ygt#Select the feature selection operator in the tree view. Change the search directory from forward (forward selection) to backward (backward elimination). Restart the process. All features will be selected.#ylt#/li#ygt# #ylt#li#ygt#Select the feature selection operator. Right click to open the context menu and repace the operator by another feature selection scheme (for example a genetic algorithm).#ylt#/li#ygt# #ylt#li#ygt#Have a look at the list of the process log operator. Every time it is applied it collects the specified data. Please refer to the RapidMiner Tutorial for further explanations. After changing the feature selection operator to the genetic algorithm approach, you have to specify the correct values. #ylt#table#ygt##ylt#tr#ygt##ylt#td#ygt##ylt#icon#ygt#groups/24/visualization#ylt#/icon#ygt##ylt#/td#ygt##ylt#td#ygt##ylt#i#ygt#Use the process log operator to log values online.#ylt#/i#ygt##ylt#/td#ygt##ylt#/tr#ygt##ylt#/table#ygt# #ylt#/li#ygt# #ylt#/ul#ygt# #ylt#/p#ygt#"/>
        <operator name="Input" class="ExampleSource">
            <parameter key="attributes" value="../data/polynomial.aml"/>
        </operator>
        <operator name="FS" class="FeatureSelection" expanded="yes">
            <operator name="XValidation" class="XValidation" expanded="yes">
                <parameter key="sampling_type" value="shuffled sampling"/>
                <operator name="NearestNeighbors" class="NearestNeighbors">
                    <parameter key="k" value="5"/>
                </operator>
                <operator name="ApplierChain" class="OperatorChain" expanded="yes">
                    <operator name="Applier" class="ModelApplier">
                        <list key="application_parameters">
                        </list>
                    </operator>
                    <operator name="Performance" class="Performance">
                    </operator>
                </operator>
            </operator>
            <operator name="ProcessLog" class="ProcessLog">
                <list key="log">
                  <parameter key="generation" value="operator.FS.value.generation"/>
                  <parameter key="performance" value="operator.FS.value.performance"/>
                </list>
            </operator>
        </operator>
    </operator>
    Now if your "adapting" involved changing the learner then you would get that error, because nearest neighbour handles number labels, unlike LibSVM classification, rather obviously.
  • darkforce
    darkforce New Altair Community Member
    i actually copied the codes from the tutorial and tried on Rapid-Miner...
    Let me try with your sample and see if I get the same error..

    thanks  :D
  • haddock
    haddock New Altair Community Member
    How strange, as I copied the XML from the tutorial... 8)