机器学习基于sklearn(1)--sklearn基础
一、数据预处理 1. 数据拆分 sklearn.model_selection.train_test_split() 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 from sklearn.datasets import load_wine from sklearn.model_selection import train_test_split import pandas as pd wine = load_wine() # 字典 feats = wine["data"] feats_name = wine["feature_names"] feats_df = pd.DataFrame(feats, columns=feats_name) targets...