摘要: 环境介绍: 10.60.81.160 10.60.81.161 10.60.81.162 搭建过程 前提是安装java环境,ELK6.2版本需要jdk为1.8,官方推荐安装OracleJDK 最好不要安装OpenJDK.安装jdk参考:linux安装jdk 只需要将安装包换成1.8的就行。 Elas 阅读全文
posted @ 2018-12-18 13:44 何国秀_xue 阅读(131) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib as mplimport matplotlib.pyplot as pltfrom sklearn import datasetsraw_data_X = [[3.393533211, 2.331273381], [3.1100 阅读全文
posted @ 2018-12-18 10:34 何国秀_xue 阅读(200) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltdef sigmoid(t): return 1 / (1 + np.exp(-t))x = np.linspace(-10,10,500)print(x)y = sigmoid(x)plt.plot( 阅读全文
posted @ 2018-12-18 10:33 何国秀_xue 阅读(164) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltfrom sklearn import datasetsiris = datasets.load_iris()X = iris.datay = iris.targetX = X[y<2,:2]#prin 阅读全文
posted @ 2018-12-18 10:32 何国秀_xue 阅读(229) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib as mplimport matplotlib.pyplot as pltfrom sklearn import datasetsclass train_test_split1: def __init__(self): prin 阅读全文
posted @ 2018-12-18 10:31 何国秀_xue 阅读(466) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltx = np.random.uniform(-3,3, size=100)X = x.reshape(-1,1)y =0.5 * x**2 + x + np.random.normal(0,1,size 阅读全文
posted @ 2018-12-18 10:30 何国秀_xue 阅读(156) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltplot_x = np.linspace(-1,6,141)plot_y = (plot_x - 2.5)**2 -1#plt.plot(plot_x,plot_y)#plt.show()#损失函数求导 阅读全文
posted @ 2018-12-18 10:30 何国秀_xue 阅读(135) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltnp.random.seed(666)x = 2 * np.random.random(size=100)y = x*3. + 4. + np.random.normal(size=100)X = x. 阅读全文
posted @ 2018-12-18 10:30 何国秀_xue 阅读(295) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport matplotlib.pyplot as pltX = np.empty((100,2))X[:,0] = np.random.uniform(0,100,size=100)X[:,1] = 0.75 * X[:,0] + 3. + np.rando 阅读全文
posted @ 2018-12-18 10:29 何国秀_xue 阅读(416) 评论(0) 推荐(0) 编辑
摘要: import numpy as npfrom dev.metrics import accuracy_scoreclass LogisticRegression: def __init__(self): """初始化Linear Regression模型""" self.coef_ = None s 阅读全文
posted @ 2018-12-18 10:28 何国秀_xue 阅读(343) 评论(0) 推荐(0) 编辑