naive_bayes
#-*- coding:utf-8 -*- # 二项分布 多项分布 # 二项分布公式 P(A|B) = P(B|A) * P(A)/P(B) from sklearn.naive_bayes import GaussianNB from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split iris = load_iris() X = iris['data'] y = iris['target'] X_train, X_test, y_train, y_test = trai
用户评论