# Is Multinomial logistic regression appropriate for this dataset?

I have the following dataset shown below. Any value between 500 & 900 were categorized as A, while values between 900 & ~1500 were mixed between A and B. I want to find the probability of getting A, B, and C at any value of x where x is my independent variable and A,B,C are my dependent variables. It seems to be a good fit for multinomial logistic regression. I believe the number of observations for each dependent variable is sufficient. If multinomial log regression is appropriate, I wish to uses Python's scikit learn logistic regression module to obtain my probability of A, B, and C at any value of x but I am not sure how to approach this using that module.

• Yes, this would be an appropriate approach. Questions requesting code help would be off-topic here, but you might try on stackoverflow.com – mkt - Reinstate Monica Nov 13 '17 at 19:24

Your outcome is ordered, but a multinomial logit would ignore that, since it is a model for a categorical dependent variable with outcomes that have no natural ordering (like bus, train, car for mode of transportation).

I would consider taking a look at ordered logit/probit since that seems more like your setting and can produce probabilities for each class.

• the outcome is the random variable $Y \in \{A,B,C\}$, why do you say it's ordered? It could just as likely be bus, train car. The input $X$ has order i.e $500-900$ etc. Unless I have misunderstood the OP. – A.D Nov 13 '17 at 22:51
• @A.D. I believe that because higher values of x correspond to letters lower in the alphabet based on the histogram. – Dimitriy V. Masterov Nov 13 '17 at 22:55
• yes, but $X$ is the input. The problem is like the following statement: given the weight of the vehicle $X$, predict if it is a bus, car, train. So IMO, the order does not matter. (Also lower $X$ seems to correspond to letter $B$, but no information regarding the meaning of the labels are given) – A.D Nov 13 '17 at 22:59
• I looked up ordered logit and it said "The ordered logit (probit) model assumes that the distance between each category of the outcome is proportional." My A,B,C are distributions of values recorded from a physical process where A tends to output more medium values, B lower values, and C higher values. How would I interpret the proportional distance between 3 distributions? – Fanylion Nov 13 '17 at 23:26
• I think I was wrong about the order above, so low values of X are for B, middle values are for A, and high values are for C, so it is not proportional to alphabet rank, like bond ratings. But the exact labels are not important, it could be {1,2,3}. What matters is there is some ordinality. – Dimitriy V. Masterov Nov 13 '17 at 23:27

If you want to predict a single class, or if you are working under the assumption that each sample, $x$ should have one class then, yes Multinomial logistic regression is the right choice.

If on the other hand, you want to allow the model to assign more than one class for an example maybe $x$ could be assigned both $A$ and $B$ then you may want to use multiple (3 in your case) independent binary logistic regression classifiers.

• I wish to assign probabilities to each class. For example at a certain x my probabilities will be, 70% A, 30% B, 0% C. – Fanylion Nov 13 '17 at 22:14
• then you want multinomial logistic regression. (the first case in my answer) – A.D Nov 13 '17 at 22:45