一、导入模块
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn import metrics
import numpy as np
二、加载x,y测试集训练集
x = np.array([[-1, -1],[-2, -1],
[1, 1],[2, 1],
[-1, 1],[-1, 2],
[1, -1],[1, -2],
[1, 1],[2, 2]])
y = np.array([1, 1, 0, 1, 0, 0, 1, 1, 0, 1])
# 1、得到测试集,测试集标签,训练集,训练集标签
x_train, x_test, y_train