(self, X, y, n_repeat=10, is_incremental=False)
Train the model from X and y.

        Parameters
        ----------
        X: 2D array, optional (default=None)
            Feature matrix of the whole dataset.

        y: 2D array, optional (default=None)
            Label matrix of the whole dataset.

        n_repeat: int, optional (default=10)
            The number of optimization iterations.

        is_incremental: bool, optional (default=False)
            Whether to train the model in an incremental way.
Train the model from X and y.
Train the model from X and y .
def fit(self, X, y, n_repeat=10, is_incremental=False):
        """Train the model from X and y.

        Parameters
        ----------
        X: 2D array, optional (default=None)
            Feature matrix of the whole dataset.

        y: 2D array, optional (default=None)
            Label matrix of the whole dataset.

        n_repeat: int, optional (default=10)
            The number of optimization iterations.

        is_incremental: bool, optional (default=False)
            Whether to train the model in an incremental way.
        """
        if not self._init_flag or not self._ini_parameters:
            self._ini_parameters = self.init_model_train(X, y, n_repeat=n_repeat)
            self._B, self._V, self._AB, self._AV, self._Anum, self._trounds, self._costs, self._norm_up, \
            self._step_size0, self._num_sub, self._lmbda, self._avg_begin, self._avg_size, self._n_repeat, \
            self._max_query = self._ini_parameters
            self._init_flag = True

        if not is_incremental:
            self._B, self._V, self._AB, self._AV, self._Anum, self._trounds, self._costs, self._norm_up, \
            self._step_size0, self._num_sub, self._lmbda, self._avg_begin, self._avg_size, self._n_repeat, \
            self._max_query = self._ini_parameters

        for i in range(n_repeat):
            self._B, self._V, self._AB, self._AV, self._Anum, self._trounds = self.train_model(
                X, y, self._B, self._V, self._costs, self._norm_up,
                self._step_size0, self._num_sub, self._AB, self._AV, self._Anum, self._trounds,
                self._lmbda, self._avg_begin, self._avg_size)
def fit ( self , X , y , n_repeat = 10 , is_incremental = False ) : if not self . _init_flag or not self . _ini_parameters : self . _ini_parameters = self . init_model_train ( X , y , n_repeat = n_repeat ) self . _B , self . _V , self . _AB , self . _AV , self . _Anum , self . _trounds , self . _costs , self . _norm_up , self . _step_size0 , self . _num_sub , self . _lmbda , self . _avg_begin , self . _avg_size , self . _n_repeat , self . _max_query = self . _ini_parameters self . _init_flag = True if not is_incremental : self . _B , self . _V , self . _AB , self . _AV , self . _Anum , self . _trounds , self . _costs , self . _norm_up , self . _step_size0 , self . _num_sub , self . _lmbda , self . _avg_begin , self . _avg_size , self . _n_repeat , self . _max_query = self . _ini_parameters for i in range ( n_repeat ) : self . _B , self . _V , self . _AB , self . _AV , self . _Anum , self . _trounds = self . train_model ( X , y , self . _B , self . _V , self . _costs , self . _norm_up , self . _step_size0 , self . _num_sub , self . _AB , self . _AV , self . _Anum , self . _trounds , self . _lmbda , self . _avg_begin , self . _avg_size )