作者:匿名用户链接:https://www.zhihu.com/question/52992079/answer/156294774来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. (sklearn官方指南:Choosing the right estimator) 0)选择合适的机器学习算法 All models are wrong, but some models are useful. — George Box (Box and Draper 1987) 根据
使用sklearn解决回归问题 依然是加载数据 import numpy as np import matplotlib.pyplot as plt from sklearn import datasets boston = datasets.load_boston() X = boston.data y = boston.target X = X[y < 50.0] y = y[y < 50.0] 通过shape看X矩阵中的结构 X.shape 然后对数据集进行切分,由于sklearn中的随