k近邻算法(鸢尾花分类)
导入模块
font = FontProperties(fname=’/Library/Fonts/Heiti.ttc’)
# 获取数据
```python
iris_data = datasets.load_iris()
X = iris_data.data[:, [2, 3]]
y = iris_data.target
label_list = ['山鸢尾', '杂色鸢尾', '维吉尼亚鸢尾']
font = FontProperties(fname=’/Library/Fonts/Heiti.ttc’)
# 获取数据
```python
iris_data = datasets.load_iris()
X = iris_data.data[:, [2, 3]]
y = iris_data.target
label_list = ['山鸢尾', '杂色鸢尾', '维吉尼亚鸢尾']