https://scikit-learn.org/stable/auto_examples/neighbors/plot_classification.html
Nearest Neighbors Classification — scikit-learn 0.21.3 documentation
Note Click here to download the full example code Nearest Neighbors Classification Sample usage of Nearest Neighbors classification. It will plot the decision boundaries for each class. print(__doc__) import numpy as np import matplotlib.pyplot as plt from
scikit-learn.org
https://scikit-learn.org/stable/modules/naive_bayes.html
1.9. Naive Bayes — scikit-learn 0.21.3 documentation
1.9. Naive Bayes Naive Bayes methods are a set of supervised learning algorithms based on applying Bayes’ theorem with the “naive” assumption of conditional independence between every pair of features given the value of the class variable. Bayes’ theorem s
scikit-learn.org
>> from sklearn import datasets
>>> iris = datasets.load_iris()
>>> from sklearn.naive_bayes import GaussianNB
>>> gnb = GaussianNB()
>>> y_pred = gnb.fit(iris.data, iris.target).predict(iris.data)
>>> print("Number of mislabeled points out of a total %d points : %d"
... % (iris.data.shape[0],(iris.target != y_pred).sum()))
Number of mislabeled points out of a total 150 points : 6