Logistic regression says only one label

GoryeoGoryeo MemberPosts:5Learner I
edited December 2020 inHelp
I'm having a hard time finding a work around with this problem. So, I used Discretize by User Specification to categorized the values into five categories (Above Average, MTM, AM, LM, and VLM) then I set its role to label. I then used Cross Validation. This is where I started encountering problems, in the training area I used a logistic regression model but apparently it cannot handle a polynomial label. After browsing the internet, I used the Polynominal by Binominal Classification model then put the Logistic Regression model there. The error was gone but when I ran the process it says that it does have sufficient capabilities in handling an example set with only one label.

Correct me if I'm wrong, as I know, Logistic regression will run as long there are two values in a label (for example like yes or no). But why is it saying that my label has only one value when in fact it has five.
Tagged:

Answers

  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn
    Hi@Goryeo,

    我认为由于“运气不好”,你的一个折叠during theCross Validationcontains only examples with one value of your label
    Maybe have you got an imbalanced dataset too ?
    Try to useSplit ValidationinsteadCross Validationand tell us if this error is still present...

    Regards,

    Lionel
  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn
    If you want to use Logistic Regression then you probably should copy your existing label, then use Map to take your 5 values now to turn them into 2 new values, and then turn that version into your label. It will make subsequent processing much easier.

    Brian T.
    Lindon Ventures
    Data Science Consulting from Certified RapidMiner Experts
  • jacobcybulskijacobcybulski Member, University ProfessorPosts:391Unicorn
    Also make sure you eliminate missing values which get interpreted by some models as a separate value.
  • jacobcybulskijacobcybulski Member, University ProfessorPosts:391Unicorn
    By the way, if you want to have polynomial label, why not using a different model type, such as a decision tree? If it has to be a linear model, you can also use a General Linear Model with multinomial family type.
Sign InorRegisterto comment.