Function fit

Synopsis

def fit(self, X, y, groups=None)

Description

No description yet.

Mentioned in

Source

Lines 87-100 in python/thundergbm/thundergbm.py.

def fit(self, X, y, groups=None):
    if self.model is not None:
        thundergbm.model_free(byref(self.model))
        self.model = None
    sparse = sp.isspmatrix(X)
    if sparse is False:
        X = sp.csr_matrix(X)
    X, y = check_X_y(X, y, dtype=np.float64, order='C', accept_sparse='csr')
    fit = self._sparse_fit
    fit(X, y, groups=groups)
    return self





Add Discussion as Guest

Log in