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

Add configuration example that uses Bayesian hyperparam optimization #112

Merged
merged 1 commit into from
Aug 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/user/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,36 @@ passed at runtime.
'n_jobs': -1,
}

Can I use Bayesian optimization instead of grid search to tune my hyperparameters?
==================================================================================

The grid search configuration allows you to use a class other than
:class:`sklearn.grid_search.GridSearchCV` to do the hyperparameter
search. Here's an example configuration that uses `scikit-optimize
<https://scikit-optimize.github.io/>`_ to search for hyperparameters
using Bayesian optimization, assuming an :class:`sklearn.svm.SVC`
classifier:

.. code-block:: python

'grid_search': {
'__factory__': 'skopt.BayesSearchCV',
'estimator': {'__copy__': 'model'},
'n_iter': 16,
'search_spaces': {
'C': {
'__factory__': 'skopt.space.Real',
'low': 1e-6, 'high': 1e+1, 'prior': 'log-uniform',
},
'degree': {
'__factory__': 'skopt.space.Integer',
'low': 1, 'high': 20,
},
},
'return_train_score': True,
'refit': False,
'verbose': 4,
}

Can I use my cluster to run a hyperparameter search?
====================================================
Expand Down