'Fit Gaussian Naive Bayes according to X, y
Parameters
X : array-like, shape (n_samples, n_features)
Training vectors, where n_samples is the number of samples
and n_features is the number of features.
y : array-like, shape (n_samples,)
Target values.
sample_weight : array-like, shape (n_samples,), optional (default=None)
Weights applied to individual samples (1. for unweighted).
.. versionadded:: 0.17
Gaussian Naive Bayes supports fitting with *sample_weight*.
Returns
self : object
Returns self.'

def fit(self, X, y, sample_weight=None):

    (X, y) = check_X_y(X, y)
    return self._partial_fit(X, y, np.unique(y), _refit=True, sample_weight=sample_weight)
