"error 118"
atulsajjanhar
New Altair Community Member
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>
<operator name="Binary2MultiClassLearner" class="Binary2MultiClassLearner" expanded="yes">
<operator name="LibSVMLearner" class="LibSVMLearner">
<parameter key="kernel_type" value="linear"/>
<list key="class_weights">
</list>
</operator>
</operator>
<operator name="ExampleSource (2)" class="ExampleSource">
<parameter key="attributes" value="C:\Program Files\Rapid-I\RapidMiner\lib\a2"/>
</operator>
<operator name="ModelApplier" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="Performance" class="Performance">
</operator>
</operator>
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.
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>
<operator name="Binary2MultiClassLearner" class="Binary2MultiClassLearner" expanded="yes">
<operator name="LibSVMLearner" class="LibSVMLearner">
<parameter key="kernel_type" value="linear"/>
<list key="class_weights">
</list>
</operator>
</operator>
<operator name="ExampleSource (2)" class="ExampleSource">
<parameter key="attributes" value="C:\Program Files\Rapid-I\RapidMiner\lib\a2"/>
</operator>
<operator name="ModelApplier" class="ModelApplier">
<list key="application_parameters">
</list>
</operator>
<operator name="Performance" class="Performance">
</operator>
</operator>
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.
0
Answers
-
Hi,
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...
Greetings,
Sebastian0