sklearn实现随机森林回归预测
sklearn实现随机森林回归预测import numpy as npimport matplotlib.pyplot as pltfrom sklearn import ensembledef gen_data(x1, x2): # 生成数据 y = np.sin(x1) * 0.1 + np.cos(x2) * 0.4 + 0.1 * x1 return ydef load_data(): x1_train = np.linspace(0, 50, 50
原创
2020-05-14 15:55:10 ·
10587 阅读 ·
0 评论