Multi Class Labels
Hi, i am working with the data set of multi class labels can any one help me how to compare ROCs for such multi class labels ,even i couldn't find how to plot the results of multi class labels. I have used Binary2Multiclass learner and Polynomial by binomial classification but i am not getting the curve. I would feel better if you send the related operators with wiring. Thanks in advance...
Find more posts tagged with
Sort by:
1 - 15 of
151
Hi Marius,
I am a newbie in Rapid Miner.
I am also facing same problem, when try to create a logistic model, here my label have more than 2 categories.
I know Logistic model is for modelling on Binomial Labels, But here I am asking that "How to Implement Multinomial Logistic Model in Rappid Miner"
Thanks in advance...
I am a newbie in Rapid Miner.
I am also facing same problem, when try to create a logistic model, here my label have more than 2 categories.
I know Logistic model is for modelling on Binomial Labels, But here I am asking that "How to Implement Multinomial Logistic Model in Rappid Miner"
Thanks in advance...
Hi Marius,
Thanks for your suggestion, It worked.
Now I am trying to understand its output, I used "Naive Bayes" Classifier in it.
Well Thanks again for your Help.
With Regards
Rahul Trivedi
Thanks for your suggestion, It worked.
Now I am trying to understand its output, I used "Naive Bayes" Classifier in it.
Well Thanks again for your Help.

With Regards
Rahul Trivedi
Well, Naive Bayes supports multi-class labels out of the box 
Actually Polynominal by Binominal Classification performs (by default) a one-vs.-all strategy: http://en.wikipedia.org/wiki/Multiclass_classification
Best regards,
Marius

Actually Polynominal by Binominal Classification performs (by default) a one-vs.-all strategy: http://en.wikipedia.org/wiki/Multiclass_classification
Best regards,
Marius
]Hi,
I have similar problem: I have create a logistic model, my label have 3 categories.
I use Polynomial by Binomial Classification with subprocess Logistic Regression.
The problem is when I testing the model:
I use X-Validation. In the testing subprocess i use Apply Model > Performance and the console says that: Label and prediction must be of the same type but are polynominal and nominal, respectively.
I don't know how solve it.

I have similar problem: I have create a logistic model, my label have 3 categories.
I use Polynomial by Binomial Classification with subprocess Logistic Regression.
The problem is when I testing the model:
I use X-Validation. In the testing subprocess i use Apply Model > Performance and the console says that: Label and prediction must be of the same type but are polynominal and nominal, respectively.
I don't know how solve it.
Tree Process:
>Retrieve DB
>Set Role
>X-Validation
>>Training
>>>Polynomial by Binomial Classification
>>>>Logistic Regression
>>Testing
>>>Apply Model
>>>%Performance
Error: Label and prediction must be of the same type but are polynominal and nominal, respectively.
I think that I have to use some operator more before %Perfomance but I don't know which.
The outport lab in Apply Model is:
label Y(LABEL) polynominal =[A, B, C] = 0
DifX real =[-2.097 – 2.398] = 0
prediction prediction(Y(LABEL)) nominal ⊆[A, B, C] = 0
confidence_A confidence(A) real ⊆[0 – 1] = 0
confidence_B confidence(B) real ⊆[0 – 1] = 0
confidence_C confidence(C) real ⊆[0 – 1] = 0
I don't know how solve it.
>Retrieve DB
>Set Role
>X-Validation
>>Training
>>>Polynomial by Binomial Classification
>>>>Logistic Regression
>>Testing
>>>Apply Model
>>>%Performance
Error: Label and prediction must be of the same type but are polynominal and nominal, respectively.
I think that I have to use some operator more before %Perfomance but I don't know which.
The outport lab in Apply Model is:
label Y(LABEL) polynominal =[A, B, C] = 0
DifX real =[-2.097 – 2.398] = 0
prediction prediction(Y(LABEL)) nominal ⊆[A, B, C] = 0
confidence_A confidence(A) real ⊆[0 – 1] = 0
confidence_B confidence(B) real ⊆[0 – 1] = 0
confidence_C confidence(C) real ⊆[0 – 1] = 0
I don't know how solve it.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Root">
<description><p>This process loads numerical data from file and generates some attributes with the feature generation operator. The parameter list &quot;functions&quot; of the generation operator must be edited in order to define the functions which should be generated. </p><p>Try the following: <ul><li>Start the process. Use breakpoints to check the generation step. The parameter &quot;keep_all&quot; defines if all attributes should be used for the result example set or only the newly generated ones.</li><li>Edit the parameter list &quot;functions&quot; and add some other functions. Most of the known mathematical functions can be used.</li></ul></p></description>
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve PR" width="90" x="45" y="30">
<parameter key="repository_entry" value="//P/PR"/>
</operator>
<operator activated="true" class="set_role" compatibility="5.3.015" expanded="true" height="76" name="Set Role" width="90" x="246" y="30">
<parameter key="attribute_name" value="Y (LABEL)"/>
<parameter key="target_role" value="label"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="x_validation" compatibility="5.3.015" expanded="true" height="112" name="Validation" width="90" x="447" y="30">
<process expanded="true">
<operator activated="true" class="polynomial_by_binomial_classification" compatibility="5.3.015" expanded="true" height="76" name="Polynominal by Binominal Classification" width="90" x="62" y="30">
<parameter key="parallelize_learning_process" value="true"/>
<process expanded="true">
<operator activated="true" class="logistic_regression" compatibility="5.3.015" expanded="true" height="94" name="Logistic Regression" width="90" x="313" y="30"/>
<connect from_port="training set" to_op="Logistic Regression" to_port="training set"/>
<connect from_op="Logistic Regression" from_port="model" to_port="model"/>
<portSpacing port="source_training set" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
</process>
</operator>
<connect from_port="training" to_op="Polynominal by Binominal Classification" to_port="training set"/>
<connect from_op="Polynominal by Binominal Classification" from_port="model" to_port="model"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="5.3.015" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance" compatibility="5.3.015" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve PR" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
<connect from_op="Validation" from_port="model" to_port="result 1"/>
<connect from_op="Validation" from_port="averagable 1" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
<process version="5.3.015">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Root">
<description><p>This process loads numerical data from file and generates some attributes with the feature generation operator. The parameter list &quot;functions&quot; of the generation operator must be edited in order to define the functions which should be generated. </p><p>Try the following: <ul><li>Start the process. Use breakpoints to check the generation step. The parameter &quot;keep_all&quot; defines if all attributes should be used for the result example set or only the newly generated ones.</li><li>Edit the parameter list &quot;functions&quot; and add some other functions. Most of the known mathematical functions can be used.</li></ul></p></description>
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve PR" width="90" x="45" y="30">
<parameter key="repository_entry" value="//P/PR"/>
</operator>
<operator activated="true" class="set_role" compatibility="5.3.015" expanded="true" height="76" name="Set Role" width="90" x="246" y="30">
<parameter key="attribute_name" value="Y (LABEL)"/>
<parameter key="target_role" value="label"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="x_validation" compatibility="5.3.015" expanded="true" height="112" name="Validation" width="90" x="447" y="30">
<process expanded="true">
<operator activated="true" class="polynomial_by_binomial_classification" compatibility="5.3.015" expanded="true" height="76" name="Polynominal by Binominal Classification" width="90" x="62" y="30">
<parameter key="parallelize_learning_process" value="true"/>
<process expanded="true">
<operator activated="true" class="logistic_regression" compatibility="5.3.015" expanded="true" height="94" name="Logistic Regression" width="90" x="313" y="30"/>
<connect from_port="training set" to_op="Logistic Regression" to_port="training set"/>
<connect from_op="Logistic Regression" from_port="model" to_port="model"/>
<portSpacing port="source_training set" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
</process>
</operator>
<connect from_port="training" to_op="Polynominal by Binominal Classification" to_port="training set"/>
<connect from_op="Polynominal by Binominal Classification" from_port="model" to_port="model"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="5.3.015" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="performance" compatibility="5.3.015" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve PR" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
<connect from_op="Validation" from_port="model" to_port="result 1"/>
<connect from_op="Validation" from_port="averagable 1" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
I tried your process and it works fine for me if i use sonar.
What do you mean with the comment:
What do you mean with the comment:
What feature generation operator? Generate Attributes? Where do you add this?
This process loads numerical data from file and generates some attributes with the feature generation operator. The parameter list "functions" of the generation operator must be edited in order to define the functions which should be generated. Try the following: Start the process. Use breakpoints to check the generation step. The parameter "keep_all" defines if all attributes should be used for the result example set or only the newly generated ones. Edit the parameter list "functions" and add some other functions. Most of the known mathematical functions can be used.
The label of the Sonar database is nominal and it has two possible values (mine, rock)
In my case, the label is polynominal with three values (A,B,C)
The Problem Tab says: Label and prediction must be of the same type but are polynominal and nominal, respectively. Location:Performance.labelled data
The outport lab in Apply Model is:
label Y(LABEL) polynominal =[A, B, C] = 0
DifX real =[-2.097 – 2.398] = 0
prediction prediction(Y(LABEL)) nominal ⊆[A, B, C] = 0
confidence_A confidence(A) real ⊆[0 – 1] = 0
confidence_B confidence(B) real ⊆[0 – 1] = 0
confidence_C confidence(C) real ⊆[0 – 1] = 0
I send you the database file to your email for you test it. OK?
The other thing, about the comment I have no idea.
I suppose it is because I was tried some operators and then I deleted it.
But I don't generate any attributes or something like that.
Thanks
In my case, the label is polynominal with three values (A,B,C)
The Problem Tab says: Label and prediction must be of the same type but are polynominal and nominal, respectively. Location:Performance.labelled data
The outport lab in Apply Model is:
label Y(LABEL) polynominal =[A, B, C] = 0
DifX real =[-2.097 – 2.398] = 0
prediction prediction(Y(LABEL)) nominal ⊆[A, B, C] = 0
confidence_A confidence(A) real ⊆[0 – 1] = 0
confidence_B confidence(B) real ⊆[0 – 1] = 0
confidence_C confidence(C) real ⊆[0 – 1] = 0
I send you the database file to your email for you test it. OK?
The other thing, about the comment I have no idea.
I suppose it is because I was tried some operators and then I deleted it.
But I don't generate any attributes or something like that.
Thanks
Hello @FARWA
Try adding breakpoint before performance operator, you can do so by right-clicking on the performance operator and selecting breakpoint before. Once you set the breakpoint then run the process and see in the output id the type of predictor and label are same or not. I am sure they are not same based on your error, you can check the process if you are changing the label attribute type. If you cannot resolve that, you can create a new thread and provide us with the XML code from XML window (View --> Show Panel --> XML) and also data if possible.

Try adding breakpoint before performance operator, you can do so by right-clicking on the performance operator and selecting breakpoint before. Once you set the breakpoint then run the process and see in the output id the type of predictor and label are same or not. I am sure they are not same based on your error, you can check the process if you are changing the label attribute type. If you cannot resolve that, you can create a new thread and provide us with the XML code from XML window (View --> Show Panel --> XML) and also data if possible.

ROC curves can only visualize binary classification problems - what kind of output do you expect?
Best regards,
Marius