1

Can some please help me understand, if I can use linear regression if I have 100 classes to predict. The calue to predict is discrete in nature like 1 to 100.

How do i decide if linear is better than logistic regression.

Appreciate your kind help.

Vinod
  • 13
  • 2
  • Linear is for regression, logistic for classification. You need a regression here – yatu Jun 12 '20 at 12:53
  • Your requirement here is prediction (based on what information you have provided). Hence Linear Regression is your answer, Logistics Regression is only for classification. – a_r Jun 12 '20 at 12:59

1 Answers1

0

Linear regression should be used when the outcome is continuous, whereas logistic regressions should be used when the outcome is discrete.

Since your outcome is discrete in nature, you need logistic regression.

Check this stack overflow question for a more in-depth discussion of the difference between linear and logistic regression.

tersrth
  • 861
  • 6
  • 18
  • No, logistic regression is for categorical targets. This is clearly a regression task – yatu Jun 12 '20 at 12:57
  • @yatu the question clearly stated that the predictions are discrete in nature, i.e. separated into different 'groups' (1, 2, 3, .., 100). logistic regression is used for these types of discrete tasks. – tersrth Jun 12 '20 at 13:03
  • @yatu please re-read the question and/or the link i provided. – tersrth Jun 12 '20 at 13:03
  • No. logistic regression is a classifier. It assigns an output probability to each class. This only makes sense if the dependant variable is categorical, i.e there is no sense of "order" in it. Otherwise it is a regression task. Please make sure to have these basic concepts right before providing an answer – yatu Jun 12 '20 at 13:10
  • @Pranav - Thank Your for your comments and answer. These 100 values are catergorical and nominal but not ordinal. So, I think - I should first see if there is a linearity between input and output. If yes, then Linear if not Logistic. Please suggest. – Vinod Jun 13 '20 at 01:45
  • @user13734212 Categorical data requires logistic regression. I believe yatu thought the data was continuous between 1 and 100. You need logistic regression here. – tersrth Jun 13 '20 at 04:25