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
File: nmf.py Project: lnxpy/lale
 def __init__(self,
              n_components=None,
              init=None,
              solver='cd',
              beta_loss='frobenius',
              tol=0.0001,
              max_iter=200,
              random_state=None,
              alpha=0.0,
              l1_ratio=0.0,
              verbose=0,
              shuffle=False):
     self._hyperparams = {
         'n_components': n_components,
         'init': init,
         'solver': solver,
         'beta_loss': beta_loss,
         'tol': tol,
         'max_iter': max_iter,
         'random_state': random_state,
         'alpha': alpha,
         'l1_ratio': l1_ratio,
         'verbose': verbose,
         'shuffle': shuffle
     }
     self._wrapped_model = SKLModel(**self._hyperparams)
Example #3
0
 def __init__(
     self,
     n_components=None,
     init=None,
     solver="cd",
     beta_loss="frobenius",
     tol=0.0001,
     max_iter=200,
     random_state=None,
     alpha=0.0,
     l1_ratio=0.0,
     verbose=0,
     shuffle=False,
 ):
     self._hyperparams = {
         "n_components": n_components,
         "init": init,
         "solver": solver,
         "beta_loss": beta_loss,
         "tol": tol,
         "max_iter": max_iter,
         "random_state": random_state,
         "alpha": alpha,
         "l1_ratio": l1_ratio,
         "verbose": verbose,
         "shuffle": shuffle,
     }
     self._wrapped_model = SKLModel(**self._hyperparams)
Example #4
0
File: nmf.py Project: gbdrt/lale
 def __init__(self, **hyperparams):
     self._hyperparams = hyperparams
     self._wrapped_model = SKLModel(**self._hyperparams)