dask_ml.naive_bayes.GaussianNB
dask_ml.naive_bayes
.GaussianNB¶
- class dask_ml.naive_bayes.GaussianNB(priors=None, classes=None)¶
Fit a naive bayes model with a Gaussian likelihood
Examples
>>> from dask_ml import datasets >>> from dask_ml.naive_bayes import GaussianNB >>> X, y = datasets.make_classification(chunks=50) >>> gnb = GaussianNB() >>> gnb.fit(X, y)
Methods
get_metadata_routing
()Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
predict
(X)Perform classification on an array of test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Returns ------- C : array, shape = [n_samples] Predicted target values for X.
predict_log_proba
(X)Return log-probability estimates for the test vector X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Returns ------- C : array-like, shape = [n_samples, n_classes] Returns the log-probability of the samples for each class in the model. The columns correspond to the classes in sorted order, as they appear in the attribute classes_.
predict_proba
(X)Return probability estimates for the test vector X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Returns ------- C : array-like, shape = [n_samples, n_classes] Returns the probability of the samples for each class in the model. The columns correspond to the classes in sorted order, as they appear in the attribute classes_.
set_params
(**params)Set the parameters of this estimator.
fit
- __init__(priors=None, classes=None)¶