thuijskens / scikit-hyperband Goto Github PK
View Code? Open in Web Editor NEWA scikit-learn compatible implementation of hyperband
License: BSD 3-Clause "New" or "Revised" License
A scikit-learn compatible implementation of hyperband
License: BSD 3-Clause "New" or "Revised" License
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.
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!
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?
great code thanks and this is great too
https://www.youtube.com/watch?v=JsArBz46_3s&index=20&list=PLGVZCDnMOq0ovNxfxOqYcBcQOIny9Zvb-&t=22s
Why giving your algorithm ALL THE FEATURES does not always work - Thomas Huijskens
but can you help find code in python for FEATURES selection
for example this is in C
https://github.com/Craigacp/FEAST
and this
https://github.com/scikit-learn-contrib/stability-selection
dose not use mutual info
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'
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
Receives similar error to scikit-optimize/scikit-optimize#978
TypeError: init() got an unexpected keyword argument 'iid'
Can we put this on pypi so that others can easily download it? It's a little janky to download and install from repo.
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'
If I want to set a total budget for experiments just like the original paper, what should I do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.