1
$\begingroup$

I'm using logistic regression model to do a multi-class classification (4 classes). I want to look at the logistic regression coefficients to see the importance of different features. I got model output from a software that looks like:

Coefficients...
                                   Class
Variable                           other                  price                  image
======================================================================================
titleInAttr                      -3.5443                 7.5539               -15.8454
location                        929.1475              1900.9971                1040.68
inList                          -13.2383               -10.5824               -12.7287
imgprop                           8.9593                22.5193                13.9187
priceInAttr                       1.1979                34.0779               -25.0851

Here, only 3 classes are shown, so I wonder how to get the coefficients for the fourth class? Is it usually unnecessary to show coefficients for all classes? I'd like to know how to calculate the missing ones from the results. Thanks a lot.

$\endgroup$
4
  • $\begingroup$ Do "classes" correspond to columns of this table? Do this mean that the variable called "titleInAttr" can take any of four values, three of which are the second, third, and fourth columns? Does every variable take its values among those same four classes? Are the classes purely categorical, or ordered? ${}\qquad{}$ $\endgroup$ – Michael Hardy Jun 2 '15 at 0:50
  • $\begingroup$ @MichaelHardy Yes, classes are columns (other, price, image), but there is one more class in my csv file that is missing here. The variables under "Variable" column are features (predictors), the values are their corresponding coefficients. So other = -3.5443 * titileInAttr + location * 929.1475 - 13.2383 * inList... It's the same for price and image. The classes are purely categorical, not ordered. Thanks for your time! $\endgroup$ – J Freebird Jun 2 '15 at 1:00
  • $\begingroup$ If one class isn't listed, I'm inclined to take that to me that the given coefficients are the differences from that one unlisted class. $\endgroup$ – Michael Hardy Jun 2 '15 at 2:07
  • $\begingroup$ I'm presuming there is a response variable that is in every case $0$ or $1$, that there are no predictors other than those shown here, and every data point consists of the values of the predictors (i.e. for each of five predictors, which "class" is its value) and the $0$ or $1$ value. Is that what you've got? $\endgroup$ – Michael Hardy Jun 2 '15 at 2:11
0
$\begingroup$

You cannot get coefficients for the fourth class. The fourth class is the "baseline" case. All coefficients are relative to that one. See here for more information.

$\endgroup$
4
  • $\begingroup$ But there should still be such a thing as the logit of the estimated probability for every set of values of the variables. $\endgroup$ – Michael Hardy Jun 2 '15 at 2:08
  • $\begingroup$ You can calculate predicted probabilities for all four cases, if thats what you mean. $\endgroup$ – Greg Jun 2 '15 at 2:12
  • $\begingroup$ Thank you very much. But then how can I know which features are important to the 4th class? $\endgroup$ – J Freebird Jun 2 '15 at 2:41
  • $\begingroup$ @JFreebird A logistic regression is not great at answering those types of questions. It tells you how a given variable affects the relative probability between the given class and the baseline class. So, for example, the coefficient of 7.5539 on titleInAttr for the price class tells you that as titleInAttr increases, then you're more likely to obtain the price outcome than whatever the fourth class is. Similarly, the negative coefficient on inList in all three classes says that as inList increases, then you're more likely to obtain the fourth class in each case. $\endgroup$ – Greg Jun 2 '15 at 3:40

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.