rval = scope.sklearn_SVC(
kernel="poly",
C=hp.lognormal(
_name("C"),
np.log(1.0),
np.log(4.0)) if C is None else C,
gamma=hp.lognormal(
_name("gamma"),
np.log(1.0),
np.log(3.0)) if gamma is None else gamma,
coef0=hp.normal(
_name("coef0"),
0.0,
1.0) if coef0 is None else coef0,
degree=hp.quniform(
_name("degree"),
low=1.5,
high=6.5,
q=1) if degree is None else degree,
shrinking=hp_bool(
_name("shrinking")) if shrinking is None else shrinking,
tol=hp.lognormal(
_name("tol"),
np.log(1e-3),
np.log(10)) if tol is None else tol,
// -- this is basically only here to prevent
// an infinite loop in libsvm"s solver.
// A more useful control mechanism might be a timer
// or a kill mesg to a sub-process or something...
max_iter=scope.patience_param(scope.int(
hp.qloguniform(
_name("max_iter"),
np.log(1000),
np.log(100000),
q=10,
))) if max_iter is None else max_iter,
After Change
rval = scope.sklearn_SVC(
kernel="poly",
C=_svc_C(name) if C is None else C,
gamma=_svc_gamma(name) if gamma is None else gamma,
coef0=poly_coef0 if coef0 is None else coef0,
degree=hp.quniform(