Skip to content

Logistic Regression and Randomized Search CV #301

Description

@NogaGershonB

Hello,
I'm having trouble running logistic regression with randomized search cv.

`param_test = {'penalty': ['l1', 'l2'],
'C': [1 , 0.5, 0.1, 0.05, 0.01],
'class_weight': ['balanced', None],
'solver': ['liblinear', 'lbfgs'],
'max_iter': [100,200,300]}

n_HP_points_to_test=10
clf = LogisticRegression()
gs = RandomizedSearchCV(
estimator=clf, param_distributions=param_test,
n_iter=n_HP_points_to_test,
scoring='accuracy',
cv=3,
refit=True,
random_state=314,
verbose=True)
gs.fit(X_train_scaled, y_train)`

and this is the error message I get: TypeError: Cannot clone object '<interpret.glassbox.linear.LogisticRegression object at 0x7f7f18125250>' (type <class 'interpret.glassbox.linear.LogisticRegression'>): it does not seem to be a scikit-learn estimator as it does not implement a 'get_params' method.

Thanks,
Noga

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions