figure.classification.vs.regression.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:microbiome-summer-school-2017 作者: aldro61 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号