0
$\begingroup$

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.

enter image description here

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

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.

$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – A.D Nov 13 '17 at 22:51
  • $\begingroup$ @A.D. I believe that because higher values of x correspond to letters lower in the alphabet based on the histogram. $\endgroup$ – Dimitriy V. Masterov Nov 13 '17 at 22:55
  • $\begingroup$ 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) $\endgroup$ – A.D Nov 13 '17 at 22:59
  • $\begingroup$ 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? $\endgroup$ – Fanylion Nov 13 '17 at 23:26
  • $\begingroup$ 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. $\endgroup$ – Dimitriy V. Masterov Nov 13 '17 at 23:27
0
$\begingroup$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.