Pages: [1]
  Print  
Author Topic: Multi Class Labels  (Read 1140 times)
Priya Mohan
Newbie
*
Posts: 1


« on: January 26, 2014, 07:51:00 AM »

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... 
Logged
Marius Helf
Administrator
Hero Member
*****
Posts: 1805



WWW
« Reply #1 on: January 27, 2014, 10:05:15 AM »

Hi,

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

Best regards,
Marius
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
Please click here before posting.
Rahul Trivedi
Newbie
*
Posts: 2


« Reply #2 on: April 12, 2014, 06:37:32 AM »

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...
Logged
Marius Helf
Administrator
Hero Member
*****
Posts: 1805



WWW
« Reply #3 on: April 14, 2014, 10:09:45 AM »

Hi Rahul,

the Polynominal by Binominal Classification operator can help you.

Best regards,
Marius
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
Please click here before posting.
Rahul Trivedi
Newbie
*
Posts: 2


« Reply #4 on: April 15, 2014, 06:31:49 AM »

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.  Smiley

With Regards
Rahul Trivedi
Logged
Marius Helf
Administrator
Hero Member
*****
Posts: 1805



WWW
« Reply #5 on: April 15, 2014, 10:29:01 AM »

Well, Naive Bayes supports multi-class labels out of the box Smiley

Actually Polynominal by Binominal Classification performs (by default) a one-vs.-all strategy: http://en.wikipedia.org/wiki/Multiclass_classification

Best regards,
Marius
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
Please click here before posting.
IvanMarkus
Newbie
*
Posts: 4


« Reply #6 on: May 28, 2015, 07:54:15 PM »

]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.

« Last Edit: May 28, 2015, 08:16:01 PM by IvanMarkus » Logged
Martin Schmitz
Global Moderator
Sr. Member
*****
Posts: 311


« Reply #7 on: May 29, 2015, 07:31:26 AM »

Hi,

could you provide an example process?

Cheers,
Martin
Logged

- Consultant at Rapidminer (Germany) -
IvanMarkus
Newbie
*
Posts: 4


« Reply #8 on: May 29, 2015, 11:18:19 AM »

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.
« Last Edit: June 01, 2015, 11:54:57 AM by IvanMarkus » Logged
Martin Schmitz
Global Moderator
Sr. Member
*****
Posts: 311


« Reply #9 on: June 02, 2015, 12:53:15 PM »

hi,

would it be possible to copy the process' xml?

Cheers,
Martin
Logged

- Consultant at Rapidminer (Germany) -
IvanMarkus
Newbie
*
Posts: 4


« Reply #10 on: June 02, 2015, 01:15:32 PM »

<?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>&lt;p&gt;This process loads numerical data from file and generates some attributes with the feature generation operator. The parameter list &amp;quot;functions&amp;quot; of the generation operator must be edited in order to define the functions which   should be generated. &lt;/p&gt;&lt;p&gt;Try the following: &lt;ul&gt;&lt;li&gt;Start the process. Use breakpoints to check the generation step. The parameter &amp;quot;keep_all&amp;quot; defines if all attributes should be used for the result example set or only the newly generated ones.&lt;/li&gt;&lt;li&gt;Edit the parameter list &amp;quot;functions&amp;quot; and add some other functions. Most of the known mathematical  functions can be used.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;</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>
Logged
Martin Schmitz
Global Moderator
Sr. Member
*****
Posts: 311


« Reply #11 on: June 02, 2015, 04:18:51 PM »

I tried your process and it works fine for me if i use sonar.

What do you mean with the comment:

Quote
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. 

What feature generation operator? Generate Attributes? Where do you add this?
Logged

- Consultant at Rapidminer (Germany) -
IvanMarkus
Newbie
*
Posts: 4


« Reply #12 on: June 02, 2015, 07:02:35 PM »

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
Logged
Martin Schmitz
Global Moderator
Sr. Member
*****
Posts: 311


« Reply #13 on: June 03, 2015, 07:38:14 AM »

Hi,

you are right with sonar, i used your .csv file, and still it works fine for me. It might be because you are using 5.3 and i am using 6.X. I am not sure if our development worked on the meta operators? Maybe Marco can comment on it?

Cheers,
Martin
Logged

- Consultant at Rapidminer (Germany) -
Pages: [1]
  Print  
 
Jump to: