Can any one help me with how to perform linear regression in rapidminer

Aravind_Yadav
Aravind_Yadav New Altair Community Member
edited November 2024 in Community Q&A
Hi,
I have got an error while applying linear regression please find the screenshot and help me with this issue

Tagged:

Best Answer

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    You can use "Nominal to Numerical" to encode the categorical data to 0/1 numbers, by creating new attributes. Dummy coding is a good choice.

Answers

  • Caperez
    Caperez Altair Community Member
    Hi @Aravind_Yadav
    Remember that the linear regression doesn't work with nominal attributes, the model is waiting for numerical data.

    Best,

    Cesar
  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    You can use "Nominal to Numerical" to encode the categorical data to 0/1 numbers, by creating new attributes. Dummy coding is a good choice.
  • Aravind_Yadav
    Aravind_Yadav New Altair Community Member

  • Aravind_Yadav
    Aravind_Yadav New Altair Community Member
    I have tried and getting the error can anyone please help with this issue?
  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Hi!

    You connected Group Models in a wrong way.
    The first input of Group Models should be the pre output of Nominal to Numerical. The second will be the actual model (mod output of Linear Regression). Then you will apply the grouped model (the one consisting of NomToNum and the regression) using Apply Model. This makes sure that the same kinds of transformations are applied on both the training and the testing dataset.

    Regards,
    Balázs