
python机器学习-预测分析核心算法
llx1026
愿在人工智能界找到自己的一席之地。。。
展开
-
python机器学习核心算法3-3
import numpyfrom sklearn import datasets, linear_modelfrom math import sqrtimport matplotlib.pyplot as pltimport urllib.requestdef xattrSelect(x, idxSet): xOut = [] for row in x:原创 2017-09-04 20:39:24 · 839 阅读 · 3 评论 -
python之MSE、MAE、RMSE
target = [1.5, 2.1, 3.3, -4.7, -2.3, 0.75]prediction = [0.5, 1.5, 2.1, -2.2, 0.1, -0.5]error = []for i in range(len(target)): error.append(target[i] - prediction[i])print("Errors: ", error原创 2017-08-31 19:51:25 · 72922 阅读 · 5 评论 -
python机器学习4-6代码及运行结果
import urllib.requestfrom pylab import *from math import sqrtimport matplotlib.pyplot as plottarget_url = ("http://archive.ics.uci.edu/ml/machine-learning-databases/abalone/abalone.data")data =原创 2017-09-09 19:46:23 · 773 阅读 · 0 评论 -
python机器学习4-5代码及运行结果
import urllib.requestimport matplotlib.pyplot as plotfrom math import sqrt, cos, logtarget_url = ("http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv")data原创 2017-09-09 11:06:33 · 1155 阅读 · 0 评论 -
python机器学习4-4代码及运行结果
import urllib.requestimport sysfrom math import sqrtimport matplotlib.pyplot as plottarget_url = ("http://archive.ics.uci.edu/ml/machine-learning-databases/undocumented/connectionist-bench/sonar/原创 2017-09-09 09:55:37 · 643 阅读 · 0 评论 -
python机器学习4-3代码讲解
import urllib.requestimport numpyfrom sklearn import datasets, linear_modelfrom math import sqrtimport matplotlib.pyplot as plotdef S(z, gamma): if gamma >= abs(z): return 0.0 re原创 2017-09-08 16:40:02 · 487 阅读 · 0 评论 -
python机器学习4—2代码详解及修改
import urllib.requestimport numpyfrom sklearn import datasets, linear_modelfrom math import sqrtimport matplotlib.pyplot as plot#从网页中读取数据target_url = ("http://archive.ics.uci.edu/ml/machine-lea原创 2017-09-07 09:07:13 · 660 阅读 · 0 评论 -
python机器学习3-7使用岭回归进行岩石-水雷分类
import urllib.requestimport numpyfrom sklearn import datasets, linear_modelfrom sklearn.metrics import roc_curve, aucimport pylab as plttarget_url = ("http://archive.ics.uci.edu/ml/machine-learn原创 2017-09-06 08:23:14 · 1151 阅读 · 0 评论 -
python机器学习3-5代码
import urllib.requestimport numpyfrom sklearn import datasets, linear_modelfrom math import sqrtimport matplotlib.pyplot as plttarget_url = ("http://archive.ics.uci.edu/ml/machine-learning-datab原创 2017-09-05 20:56:12 · 565 阅读 · 0 评论 -
python机器学习-预测分析核心算法3-2代码在python3下运行遇到的一些问题
from sklearn import datasets, linear_modelfrom sklearn.metrics import roc_curve, aucimport pylab as pldef confusionMatrix(predicted, actual, threshold): if len(predicted) != len(actual):原创 2017-09-01 10:55:14 · 1698 阅读 · 3 评论