"Machine Learning 100 Days" complete table of contents: table of contents
100 days of machine learning, today's talk is: Naive Bayes - dealing with continuous data!
Open spyder and create a naive_bayes_gauss.py script. First import the standard library. Then import the dataset, here we choose the iris dataset.
The download address of the dataset: dataset , extraction code: zjfq.
#导入标准库
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import metrics
# 导入数据集
data = pd