Total Complexity | 1 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from sklearn import svm |
||
2 | |||
3 | from hyperactive.integrations import HyperactiveSearchCV |
||
4 | from hyperactive.optimizers import RandomSearchOptimizer |
||
5 | |||
6 | from sklearn.utils.estimator_checks import parametrize_with_checks |
||
7 | |||
8 | |||
9 | svc = svm.SVC() |
||
10 | parameters = {"kernel": ["linear", "rbf"], "C": [1, 10]} |
||
11 | opt = RandomSearchOptimizer() |
||
12 | |||
13 | |||
14 | @parametrize_with_checks([HyperactiveSearchCV(svc, parameters, opt)]) |
||
15 | def test_estimators(estimator, check): |
||
16 | check(estimator) |
||
17 |