Beispiel #1
0
 def __init__(self,
              nu=0.5,
              C=1.0,
              kernel='rbf',
              degree=3,
              gamma='auto_deprecated',
              coef0=0.0,
              shrinking=True,
              tol=0.001,
              cache_size=200,
              verbose=False,
              max_iter=(-1)):
     self._hyperparams = {
         'nu': nu,
         'C': C,
         'kernel': kernel,
         'degree': degree,
         'gamma': gamma,
         'coef0': coef0,
         'shrinking': shrinking,
         'tol': tol,
         'cache_size': cache_size,
         'verbose': verbose,
         'max_iter': max_iter
     }
     self._wrapped_model = SKLModel(**self._hyperparams)
Beispiel #2
0
 def fit(self, X, y=None):
     self._sklearn_model = SKLModel(**self._hyperparams)
     if (y is not None):
         self._sklearn_model.fit(X, y)
     else:
         self._sklearn_model.fit(X)
     return self
Beispiel #3
0
Datei: svc.py Projekt: sreev/lale
 def __init__(self,
              C=1.0,
              kernel='rbf',
              degree=3,
              gamma='auto_deprecated',
              coef0=0.0,
              shrinking=True,
              probability=False,
              tol=0.001,
              cache_size=200,
              class_weight='balanced',
              verbose=False,
              max_iter=(-1),
              decision_function_shape='ovr',
              random_state=None):
     self._hyperparams = {
         'C': C,
         'kernel': kernel,
         'degree': degree,
         'gamma': gamma,
         'coef0': coef0,
         'shrinking': shrinking,
         'probability': probability,
         'tol': tol,
         'cache_size': cache_size,
         'class_weight': class_weight,
         'verbose': verbose,
         'max_iter': max_iter,
         'decision_function_shape': decision_function_shape,
         'random_state': random_state
     }
     self._wrapped_model = SKLModel(**self._hyperparams)
Beispiel #4
0
 def __init__(self, penalty='l2', loss='squared_hinge', dual=True, tol=0.0001, C=1.0, multi_class='ovr', fit_intercept=True, intercept_scaling=1, class_weight='balanced', verbose=0, random_state=None, max_iter=1000):
     self._hyperparams = {
         'penalty': penalty,
         'loss': loss,
         'dual': dual,
         'tol': tol,
         'C': C,
         'multi_class': multi_class,
         'fit_intercept': fit_intercept,
         'intercept_scaling': intercept_scaling,
         'class_weight': class_weight,
         'verbose': verbose,
         'random_state': random_state,
         'max_iter': max_iter}
     self._wrapped_model = SKLModel(**self._hyperparams)
Beispiel #5
0
 def __init__(self,
              epsilon=0.0,
              tol=0.0001,
              C=1.0,
              loss='epsilon_insensitive',
              fit_intercept=True,
              intercept_scaling=1.0,
              dual=True,
              verbose=0,
              random_state=None,
              max_iter=1000):
     self._hyperparams = {
         'epsilon': epsilon,
         'tol': tol,
         'C': C,
         'loss': loss,
         'fit_intercept': fit_intercept,
         'intercept_scaling': intercept_scaling,
         'dual': dual,
         'verbose': verbose,
         'random_state': random_state,
         'max_iter': max_iter
     }
     self._wrapped_model = SKLModel(**self._hyperparams)