コード例 #1
0
 def fit(self, x, y, history):
     self._svm = IncrementalMultiSVM(
         dtype=x.dtype,
         n_features=x.shape[1],
         n_classes=2,
         l2_regularization=self.l2_regularization,
         n_sgd_iters=0,
         bfgs_kwargs={
             'maxfun': 1000,
             'iprint': 0,
             'm': 32,
             'factr': 100
         },
     )
     self._svm.fit(x, (y + 1) / 2, history)