Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param_candidates = [
- {
- 'C': [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 3, 5, 10, 20, 30, 100],
- 'gamma': [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 3, 5, 10, 20, 30, 100],
- 'kernel': ['rbf']
- }
- ]
- clf = model_selection.GridSearchCV(
- estimator=CustomEstimator(),
- param_grid=param_candidates,
- cv=5,
- refit=True,
- error_score=0,
- n_jobs=-1
- )
- from sklearn import base
- from sklearn import model_selection
- from sklearn import ensemble
- class CustomEstimator(base.BaseEstimator):
- def __init__(self):
- pass
- def fit(self, X, y=None, **params):
- return self
- def score(self, X, y=None):
- # Here how can i got the param_candidates?
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement