1

I've trained a number of Logistic Regression models for a project that I am working on. I've attained the coefficients of my features using the coef attribute. However, as I have four different target labels, the output consists of four sets of coefficients.

I've determined that each of these sets is a binary classifier for each label. How can I figure out which label each set maps to?

shwifty chill
  • 338
  • 1
  • 3
  • 12

1 Answers1

2

Okay I have found a solution.

Turns out that LogisticRegression has a classes_ attribute which outputs an array of all of your different classes (in my case [1,2,3,4]). coef_ outputs our weights and the classes that these weights map to is in the same order as classes_

which coefficients go to which class in multiclass logistic regression in scikit learn?

shwifty chill
  • 338
  • 1
  • 3
  • 12