Example #1
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
Example #2
0
 def __init__(self, base_estimator=None, n_estimators=50, learning_rate=1.0, loss='linear', random_state=None):
     self._hyperparams = {
         'base_estimator': base_estimator,
         'n_estimators': n_estimators,
         'learning_rate': learning_rate,
         'loss': loss,
         'random_state': random_state}
     self._wrapped_model = SKLModel(**self._hyperparams)
Example #3
0
 def __init__(self, base_estimator=None, n_estimators=50, learning_rate=1.0, algorithm='SAMME.R', random_state=None):
     if isinstance(base_estimator, lale.operators.Operator):
         if isinstance(base_estimator, lale.operators.IndividualOp):
             base_estimator = base_estimator._impl_instance()._wrapped_model
         else:
             raise ValueError("If base_estimator is a Lale operator, it needs to be an individual operator. ")
     self._hyperparams = {
         'base_estimator': base_estimator,
         'n_estimators': n_estimators,
         'learning_rate': learning_rate,
         'algorithm': algorithm,
         'random_state': random_state}
     self._wrapped_model = SKLModel(**self._hyperparams)
Example #4
0
 def __init__(self,
              base_estimator=None,
              n_estimators=50,
              learning_rate=1.0,
              algorithm='SAMME.R',
              random_state=None):
     self._hyperparams = {
         'base_estimator': base_estimator,
         'n_estimators': n_estimators,
         'learning_rate': learning_rate,
         'algorithm': algorithm,
         'random_state': random_state
     }
     self._wrapped_model = SKLModel(**self._hyperparams)