"Regarding Linear Regression"

maria_godricmaria_godric MemberPosts:20Maven
edited May 2019 inHelp
Hi,
I have one dependent variable and three independent variables.While fitting a Linear Regression ,it is considering the first independent variable only.Which operator can I use to get a linear regression like Y= a + b1X1 + b2X2 + b3X3.where Y is the dependent and X1,X2,X3 are independent variables.
Thanks
Maria
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2,531Unicorn
    Hi,
    you have to define your Y variable as label if not already the case. Therefor you might use the ChangeAttributeRole operator and then apply a linear regression operator. This will give your desired result.

    Greetings,
    Sebastian
  • maria_godricmaria_godric MemberPosts:20Maven
    由于Sebastain . .
    I tried it using ChangeAtributeRole but then also it considering 2 independent variables ,But I have 4 independent variables.Here I am attaching the code














    Thanks
    Maria
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2,531Unicorn
    Hi,
    if you have already defined the label during loading the data using the ExcelExampleSource (see parameter "label"), you don't need to define it again.
    It might be that two of your attributes aren't used for the linear regression, because they don't give any informations about the problem. You might disable the internal feature selection of the linear regression to test if that's the case.

    Greetings,
    Sebastian
  • maria_godricmaria_godric MemberPosts:20Maven
    Hi,
    In the name parameter tab of ChangeAttributeRole operator, which attribute should be mentioned. I mean label attribute or other attribute.

    Thanks,
    Maria
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:2,531Unicorn
    Hi Maria,
    the ChangeAttributeRole operator works on one single attribute and changes it's role. Since multiple attribute with the same role aren't allowed this is the only sensible thing to do.
    So if you want to convert one single attribute to a label, you have to specify the name of this attribute and entering the target role "label".

    Greetings,
    Sebastian
Sign InorRegisterto comment.