Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logistic Regression and Randomized Search CV #301

Open
NogaGershonB opened this issue Nov 15, 2021 · 0 comments · May be fixed by #315
Open

Logistic Regression and Randomized Search CV #301

NogaGershonB opened this issue Nov 15, 2021 · 0 comments · May be fixed by #315
Labels
bug Something isn't working

Comments

@NogaGershonB
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants