Ejemplo n.º 1
0
 def __init__(self,
              loss="hinge",
              penalty='l2',
              alpha=0.0001,
              l1_ratio=0.15,
              fit_intercept=True,
              max_iter=1000,
              tol=None,
              shuffle=True,
              verbose=0,
              epsilon=DEFAULT_EPSILON,
              n_jobs=1,
              random_state=None,
              learning_rate="optimal",
              eta0=0.0,
              power_t=0.5,
              class_weight=None,
              warm_start=False,
              average=False,
              n_iter=None):
     _skSGDClassifier.__init__(self, loss, penalty, alpha, l1_ratio,
                               fit_intercept, max_iter, tol, shuffle,
                               verbose, epsilon, n_jobs, random_state,
                               learning_rate, eta0, power_t, class_weight,
                               warm_start, average, n_iter)
     BaseWrapperClf.__init__(self)
Ejemplo n.º 2
0
 def __init__(self,
              C,
              gamma,
              learning_rate="optimal",
              class_weight=None,
              n_components=100,
              random_state=None):
     self.C = C
     self.gamma = gamma
     self.learning_rate = learning_rate
     self.loss = 'hinge'
     self.penalty = 'l2'
     NystroemSet.__init__(self,
                          gamma=gamma,
                          n_components=n_components,
                          random_state=random_state)
     SGDClassifier.__init__(self,
                            loss=self.loss,
                            penalty=self.penalty,
                            alpha=1 / C,
                            warm_start=True,
                            class_weight=class_weight)
 def __init__(self, k='all'):
     if k != None:
         MutableSGDClassifier.K_features = k
     SGDClassifier.__init__(self,alpha=.0001, n_iter=50,penalty="elasticnet")