I am doing Multiclass Classification and applying Logistic regression on it
When i fitted the data by calling
logistic.fit(InputDATA,OutputDATA)
the estimator "logistic " fits the data.
Now when I call logistic.coef_
it prints a 2D array
with 4 rows(I HAD FOUR CLASSES) and n columns(one for each feature)
THIS IS WHAT I SAW ON SCIKIT LEARN SITE:
coef_ : array, shape (n_features, ) or (n_targets, n_features) Estimated coefficients for the linear regression problem. If multiple targets are passed during the fit (y 2D), this is a 2D array of shape (n_targets, n_features), while if only one target is passed, this is a 1D array of length n_features.
Now my query is : Why different coefficients are there for different classes as i need only one hypothesis which would predict the output.