def METHOD_NAME(self, X, y=None):
    """Learn model from training data.
    Parameters
    ----------
    X : {array-like, sparse matrix}, shape = [n_samples, n_features]
        Training vectors, where n_samples is the number of samples and
        n_features is the number of features.
    Returns
    -------
    self : object
    """
    self._is_fitted = False
    self._check_arrays(X=X)
    self._fit(X=X)
    self._is_fitted = True
    return self