The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.

"error 118"

atulsajjanharatulsajjanhar Member Posts: 2 Contributor I
edited May 2019 in Help
I am getting an error with the classification task. Appreciate any suggestions.

i have a the following XML file for LibSVMLearner and classification.

<operator name="Root" class="Process" expanded="yes">
    <parameter key="logverbosity" value="error"/>
    <parameter key="logfile" value="h:\My Documents\rm_workspace\a1.log"/>
    <operator name="ExampleSource" class="ExampleSource">
        <parameter key="attributes" value="C:\Program Files\Rapid-I\RapidMiner\lib\a1"/>
        <parameter key="use_comment_characters" value="false"/>
        <parameter key="use_quotes" value="false"/>
    <operator name="Binary2MultiClassLearner" class="Binary2MultiClassLearner" expanded="yes">
        <operator name="LibSVMLearner" class="LibSVMLearner">
            <parameter key="kernel_type" value="linear"/>
            <list key="class_weights">
    <operator name="ExampleSource (2)" class="ExampleSource">
        <parameter key="attributes" value="C:\Program Files\Rapid-I\RapidMiner\lib\a2"/>
    <operator name="ModelApplier" class="ModelApplier">
        <list key="application_parameters">
    <operator name="Performance" class="Performance">

The "Performance" (and the "ClassificationPerformance") operator throws an exception.

Error 118: Wrong Number of Attributes
Error in: Performance (Performance) The attribute prediction(a1.csv (1)) has 40 different values, must be the same as the different values of the label (20). The nominal attribute has the wrong number of different values. Some operators work only for nominal attributes with a specific number of values.

Both the example sources have the same number of distinct labels (20) so why does it say 40 different values.


  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    that's a good question, which I cannot answer without the data itself. Did you check, that each possible attribute value occurred in the a1 file? Most times, this is the problem...

Sign In or Register to comment.