Git Product home page Git Product logo

scikit-hyperband's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scikit-hyperband's Issues

how to setting budget?

If I want to set a total budget for experiments just like the original paper, what should I do?

Issue with scikit-learn 0.21

self.fit_params is deprecated in scikit-learn 0.21.0 ( https://github.com/scikit-learn/scikit-learn/commit/#13519 ). scikit-optimize also has the similar issue and you can read more in this page.

When I run this,

model = lgb.LGBMClassifier()
param_dist = {
    'max_depth': [3, 5,10]
}
search = HyperbandSearchCV(model, param_dist, 
                           resource_param='n_estimators',
                           scoring='roc_auc')

I got the error like this.

TypeError: __init__() got an unexpected keyword argument 'fit_params'

setup.py install is deprecated. Use build and pip and other standards-based tools.

Below are the warnings and errors I got when doing python setup.py install. Making this pip install-able would be very helpful.

SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-10696.write-test'

error with pipeline

Hello,

I have always an error
ValueError: Invalid parameter n_estimators for estimator Pipeline(memory=None,
steps=[('umap', UMAP(a=None, angular_rp_forest=False, b=None, init='spectral',
learning_rate=1.0, local_connectivity=1.0, metric='euclidean',
metric_kwds=None, min_dist=0.1, n_components=2, n_epochs=None,
n_neighbors=15, negative_sample_rate=5, random_state=456,
repulsion_strength=1.0, s...ax_iter=1000,
multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,
verbose=0))]). Check the list of available parameters with estimator.get_params().keys().

my code
from sklearn.model_selection import RandomizedSearchCV
umap2 = umap.UMAP(random_state=456)
svc=LinearSVC(dual=False)
pipeline = Pipeline([("umap", umap2),
("svc", svc)])

params_grid_pipeline = {"umap__n_neighbors": [5,20],
"umap__n_components": [15, 25, 50],
"svc__C": [10**k for k in range(-3, 4)],
'svc__random_state':[43]}

gs=HyperbandSearchCV(estimator=pipeline, param_distributions=params_grid_pipeline, scoring='recall', cv=10, verbose=1,n_jobs = 5)

gs = gs.fit(X_train.values,y_train.values.ravel())

My params are good

Using for sklearn.neural_network

Hi! Can I use HyperbandSearchCV for tuning sklearn.neural_network?
I don't know how to set the parameter 'resource_param' in this situation.
Thx!

Add eval_set in fit?

Hi, Thank you for this excellent work. I was wondering if you could add the ability to send eval_set as a fit_params in search.py? This will allow the fit method to do early stopping (which currently isn't possible using sklearn gridsearchcv). I updated the search.py code in line 578-580 marked by 3 hash marks below:

                    for train, test in cv.split(X, y, groups):
                        X_test = X.iloc[test.tolist()]  ###
                        y_test = y[test.tolist()] ###
                        fit_params = {"eval_set": (X_test, y_test)} ###
                        jobs.append(delayed(_fit_and_score)(
                            clone(base_estimator), X, y, scorers,
                            train, test, self.verbose, parameters,
                            fit_params=fit_params,
                            return_train_score=self.return_train_score,
                            return_n_test_samples=True,
                            return_times=True, return_parameters=True,
                            error_score=self.error_score
                        ))

I know the above is a hack which is why maybe you could figure out a better way to do something like this in your package?

WIth the above edit, I can tune catboost using the CV folds for early stopping. As opposed to gridsearchcv where you have to pass in a fixed test set.

bracket

top_configurations = [x for , x in sorted(zip(results['rank_test%s' % refit_metric],
results['params']),
key=lambda x: x[0])]

In the above code, when we want to get the top_configurations of one bracket, we, in fact, take all brackets into consideration. is it right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.