![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
红小帽
还在学习
展开
-
python机器学习之安装wheel、numpy、scipy、sklearn
安装顺序:wheelnumpyscipysklearn其中sklearn是scikit-learn的简称,诸多python工具包都需要这个库尽量按照这个顺序进行安装安装过程:1.wheel的安装方法比较简单在cmd中安装wheel库,命令:pip install wheel2.numpy安装时要先下载对应的whl文件,下载地址然后在whl文件所在位置下的...原创 2018-07-25 19:49:46 · 1648 阅读 · 0 评论 -
机器学习中对分类器在某数据上的预测性能进行评估的方法
对分类器在某数据上的预测性能进行评估的方法1.使用模型自带的评估函数进行准确性测评XXX.score(X_test,y_test)2.使用sklearn.metrics里面的classification_report模块对预测结果做更加详细的分析from sklearn.metrics import classification_reportprint(classificati...原创 2019-03-05 14:53:10 · 696 阅读 · 0 评论 -
Python笔记——记录程序运行时间
可以借助time模块的time()方法:import timestarttime = time.time()time.sleep(2.3) #延时2.3sendtime = time.time()dtime = endtime - starttimeprint("程序运行时间为:%.8s s" % dtime) #时间显示到微秒...原创 2019-06-22 16:53:42 · 795 阅读 · 1 评论 -
使用scikit-learn实现机器学习分类算法——初步使用感知器分类
sklearn整体的使用过程:1.数据准备from sklearn import datasetsiris = datasets.load_iris()X = iris.data[:,[2,3]]y = iris.target2.将数据集划分为训练集隔和测试数据集from sklearn.cross_validation import train_test_splitX...原创 2019-07-15 15:04:45 · 593 阅读 · 0 评论 -
使用随机森林判定特征的重要性
from sklearn.ensemble import RandomForestClassifierfeat_labels = X.columns[0:]forest = RandomForestClassifier(n_estimators=10000, random_state=0, ...原创 2019-07-15 15:32:39 · 2467 阅读 · 0 评论