#26 Machine Learning & Data Science Challenge 26

#26 Machine Learning & Data Science Challenge 26

What is BaysianSearchCV?

  • Bayesian search, in contrast to the grid and random search, keeps track of past evaluation results, which they use to form a probabilistic model mapping hyperparameters to a probability of a score on the objective function.

Code Example:

from skopt import BayesSearchCV 

opt = BayesSearchCV( 
    SVC(), 
    { 
        'C': (1e-6, 1e+6, 'log-uniform'), 
        'gamma': (1e-6, 1e+1, 'log-uniform'), 
        'degree': (1, 8), # integer valued parameter 
        'kernel': ['linear', 'poly', 'rbf'] 
    }, 
    n_iter=32, 
    cv=3
)