Skip to content

Commit f841337

Browse files
committed
add custom regressor classifer EpistasisLab#1186
1 parent 6448bdb commit f841337

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

Diff for: tpot/config/classifier.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"""
2525

2626
import numpy as np
27-
27+
from sklearn.gaussian_process.kernels import WhiteKernel, Matern, RBF, DotProduct, RationalQuadratic, ExpSineSquared
2828
# Check the TPOT documentation for information on the structure of config dicts
2929

3030
classifier_config_dict = {
@@ -123,7 +123,25 @@
123123
'alpha': [1e-4, 1e-3, 1e-2, 1e-1],
124124
'learning_rate_init': [1e-3, 1e-2, 1e-1, 0.5, 1.]
125125
},
126-
126+
'sklearn.gaussian_process.GaussianProcessClassifier': {
127+
'kernel' : [1.0*RBF(length_scale=0.5, length_scale_bounds=(1e-05, 100000.0)),
128+
1.0*RationalQuadratic(length_scale=0.5, alpha=0.1),
129+
1.0*ExpSineSquared(length_scale=0.5, periodicity=3.0,
130+
length_scale_bounds=(1e-05, 100000.0),
131+
periodicity_bounds=(1.0, 10.0)),
132+
ConstantKernel(0.1, (0.01, 10.0))*(DotProduct(sigma_0=1.0, sigma_0_bounds=(0.1, 10.0)) ** 2),
133+
1.0**2*Matern(length_scale=0.5, length_scale_bounds=(1e-05, 100000.0),
134+
nu=0.5)],
135+
'alpha': [5e-9,1e-3, 1e-2, 1e-1, 1., 10., 100.],
136+
'normalize_y' : [True, False],
137+
'optimizer' : ['fmin_l_bfgs_b']
138+
139+
'sklearn.ensemble.AdaBoostClassifier': {
140+
'n_estimators': [100],
141+
'learning_rate': [1e-3, 1e-2, 1e-1, 0.5, 1.],
142+
'loss': ["linear", "square", "exponential"]
143+
},
144+
127145
# Preprocesssors
128146
'sklearn.preprocessing.Binarizer': {
129147
'threshold': np.arange(0.0, 1.01, 0.05)

Diff for: tpot/config/regressor.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"""
2525

2626
import numpy as np
27-
27+
from sklearn.gaussian_process.kernels import WhiteKernel, Matern, RBF, DotProduct, RationalQuadratic, ExpSineSquared
2828
# Check the TPOT documentation for information on the structure of config dicts
2929

3030
regressor_config_dict = {
@@ -117,6 +117,20 @@
117117
'power_t': [0.5, 0.0, 1.0, 0.1, 100.0, 10.0, 50.0]
118118
},
119119

120+
'sklearn.gaussian_process.GaussianProcessRegressor': {
121+
'kernel' : [1.0*RBF(length_scale=0.5, length_scale_bounds=(1e-05, 100000.0)),
122+
1.0*RationalQuadratic(length_scale=0.5, alpha=0.1),
123+
1.0*ExpSineSquared(length_scale=0.5, periodicity=3.0,
124+
length_scale_bounds=(1e-05, 100000.0),
125+
periodicity_bounds=(1.0, 10.0)),
126+
ConstantKernel(0.1, (0.01, 10.0))*(DotProduct(sigma_0=1.0, sigma_0_bounds=(0.1, 10.0)) ** 2),
127+
1.0**2*Matern(length_scale=0.5, length_scale_bounds=(1e-05, 100000.0),
128+
nu=0.5)],
129+
'alpha': [5e-9,1e-3, 1e-2, 1e-1, 1., 10., 100.],
130+
'normalize_y' : [True, False],
131+
'optimizer' : ['fmin_l_bfgs_b']
132+
}
133+
}
120134
# Preprocessors
121135
'sklearn.preprocessing.Binarizer': {
122136
'threshold': np.arange(0.0, 1.01, 0.05)

0 commit comments

Comments
 (0)