Le 21 mars 2012 07:49, Andrew Cepheus <[email protected]> a écrit : > The LogisticRegression class holds a coef_ attribute which is said to hold > the coefficients in the decision function. > High (positive) coefficients mean more correlation with the class, while low > (negative) ones mean an opposite correlation with the class. > - Assuming that I have two class in that target variable, to which class the > coefficients match? Is it the first class, i.e., y[0]?
If there are only two classes, 0 or -1 is treated as negative and 1 is treated as positive. > - Why is the shape of the coefficients [n_classes-1, n_features]? if the > top coefficients are most correlated with the first class, then the bottom > ones are most correlated with the second class? In the multi-class case, coef_ seems to have shape [n_classes, n_features] (it's a one vs the rest multiclass model). I think the docstring is wrong. Anybody can confirm? -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
