πŸ¦‰ πŸŽ€   RapidMiner Wisdom 2020 - CALL FOR SPEAKERS   πŸ¦‰ πŸŽ€

We are inviting all community members to submit proposals to speak at Wisdom 2020 in Boston.


Whether it's a cool RapidMiner trick or a use case implementation, we want to see what you have.
Form link is below and deadline for submissions is November 15. See you in Boston!

CLICK HERE TO GO TO ENTRY FORM

Multi Class Labels

PRIYAMOHANPRIYAMOHAN Member Posts: 1 Contributor I
edited November 2018 in Help
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... 

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    Hi,

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

    Best regards,
    Marius
  • rahul_trahul_t Member Posts: 2 Contributor I
    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...
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    Hi Rahul,

    the Polynominal by Binominal Classification operator can help you.

    Best regards,
    Marius
  • rahul_trahul_t Member Posts: 2 Contributor I
    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
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    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
  • IvanMarkusIvanMarkus Member Posts: 4 Contributor I
    ]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.

    image
  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,155  RM Data Scientist
    Hi,

    could you provide an example process?

    Cheers,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • IvanMarkusIvanMarkus Member Posts: 4 Contributor I
    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.
  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,155  RM Data Scientist
    hi,

    would it be possible to copy the process' xml?

    Cheers,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • IvanMarkusIvanMarkus Member Posts: 4 Contributor I
    <?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>
  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,155  RM Data Scientist
    I tried your process and it works fine for me if i use sonar.

    What do you mean with the comment:

    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?
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • IvanMarkusIvanMarkus Member Posts: 4 Contributor I
    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
  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,155  RM Data Scientist
    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
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • FARWAFARWA Member Posts: 1 Contributor I
    edited July 19
    Hi, 
    l have create suppoert vector model..but it give error 'Label and prediction must be of the same type but are polynominal and integer, respectively.
     please guide me what to do?
  • varunm1varunm1 Moderator, Member Posts: 819   Unicorn
    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.


    Regards,
    Varun
    Rapidminer Wisdom 2020 (User Track): Call for proposals 

    https://www.varunmandalapu.com/
    mbs
Sign In or Register to comment.