![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sklearn
Cenergy
这个人很懒,以至于这句话都
展开
-
sklearn岭回归
岭回归 Ridge Regressionimport numpy as npimport matplotlib.pyplot as pltnp.random.seed(42)x = np.random.uniform(-3.0, 3.0, size=100)X = x.reshape(-1, 1)y = 0.5 * x + 3 + np.random.normal(0, 1, siz...原创 2019-02-27 17:31:31 · 613 阅读 · 0 评论 -
sklearn中的LASSO
LASSOimport numpy as npimport matplotlib.pyplot as pltnp.random.seed(42)x = np.random.uniform(-3.0, 3.0, size=100)X = x.reshape(-1, 1)y = 0.5 * x + 3 + np.random.normal(0, 1, size=100)plt.sca...原创 2019-02-27 18:40:31 · 4492 阅读 · 0 评论 -
sklearn决策边界
决策边界import numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsiris = datasets.load_iris()X = iris.datay = iris.targetX = X[y<2,:2]y = y[y<2]plt.scatter(X[y==0,0],...原创 2019-03-01 12:11:24 · 3153 阅读 · 0 评论 -
仿sklearn的PCA类
新年快乐原创 2019-02-04 23:22:29 · 229 阅读 · 0 评论 -
sklearn多分类问题中的混淆矩阵
多分类问题中的混淆矩阵import numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsdigits = datasets.load_digits()X = digits.datay = digits.targetfrom sklearn.model_selection import tra...原创 2019-03-02 12:08:30 · 12091 阅读 · 4 评论 -
scikit-learn中的SVM
scikit-learn中的SVMimport numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsiris = datasets.load_iris()X = iris.datay = iris.targetX = X[y<2,:2]y = y[y<2]plt.scat...原创 2019-03-07 12:13:41 · 335 阅读 · 0 评论 -
sklearn 中的RBF核
sklearn 中的RBF核import numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsX, y = datasets.make_moons(noise=0.15, random_state=666)plt.scatter(X[y==0,0], X[y==0,1])plt.scatter(X...原创 2019-03-07 18:29:19 · 4041 阅读 · 0 评论