-
-
Notifications
You must be signed in to change notification settings - Fork 260
support for non dask arrays for HyperbandSearchCV #751
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
6b3ad51
101e6a9
fe154c6
a73e6ec
cd5645f
0017e09
f7c01c7
ef2956a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import numpy as np | ||
| import pandas as pd | ||
|
|
||
| from dask_ml.model_selection import HyperbandSearchCV | ||
| from dask_ml.datasets import make_classification | ||
| from distributed.utils_test import gen_cluster | ||
| from sklearn.linear_model import SGDClassifier | ||
|
|
||
|
|
||
| @gen_cluster(client=True) | ||
| def test_pandas(c, s, a, b): | ||
| X, y = make_classification(chunks=100) | ||
| X, y = pd.DataFrame(X.compute()), pd.Series(y.compute()) | ||
|
||
|
|
||
| est = SGDClassifier(tol=1e-3) | ||
| param_dist = {'alpha': np.logspace(-4, 0, num=1000), | ||
| 'loss': ['hinge', 'log', 'modified_huber', 'squared_hinge'], | ||
| 'average': [True, False]} | ||
|
|
||
| search = HyperbandSearchCV(est, param_dist) | ||
| search.fit(X, y, classes=y.unique()) | ||
| assert search.best_params_ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this test go in
test_hyperband.py?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes let me move it there