def make_regression_example(axis, random_state):
X, y = make_regression(n_samples=100, n_features=1, noise=30.0, random_state=random_state)
axis.scatter(X[:, 0], y, color="blue", s=10, label="Patients")
clf = LinearSVR().fit(X, y)
axis.plot(X[:, 0], clf.predict(X), color="black", label="Model")
ax2.tick_params(labelbottom='off', labelleft='off')
ax2.set_xlabel("Gene 1")
ax2.set_ylabel("Survived (years)")
ax2.legend()
figure.classification.vs.regression.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录