2

Using sklearn I can consider sample weights in my model, like this:

from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression(solver='liblinear')
logreg.fit(X_train, y_train, sample_weight=w_train)

Is there some clever way to consider sample weights also in the Logit method of statsmodel.api?

import statsmodels.api as sm
logit = sm.Logit(y, X)
giotto
  • 123
  • 1
  • 5

1 Answers1

2

It seems that there is a way of using sample weights which requires a little more work than just using a single argument, see this stackoverflow answer.

Oxbowerce
  • 8,522
  • 2
  • 10
  • 26