sklearn学习笔记3
摘要:Explaining Titanic hypothesis with decision trees decision trees are very simple yet powerful supervised learning methods, which constructs a decision tree model, which will be used to make predictio...
阅读全文
posted @
2016-09-30 09:26
pinweihelai
阅读(1085)
推荐(0)
InvocationException: GraphViz's executables not found
摘要:当我在visualize决策树,运行以下代码时,报错: InvocationException: GraphViz's executables not found 查阅资料后发现,原来我没有安装GraphViz's executables.我是用pip安装的Graphviz,但是Graphviz不是
阅读全文
posted @
2016-09-29 11:09
pinweihelai
阅读(7361)
推荐(1)
AttributeError: 'list' object has no attribute 'write_pdf'
摘要:我在可视化决策树,运行以下代码时报错:AttributeError: 'list' object has no attribute 'write_pdf' 我使用的是python3.4 查阅资料后发现,原来我使用的是较新版本的python.可以采取如下两种解决方案: try with pydotpl
阅读全文
posted @
2016-09-29 08:38
pinweihelai
阅读(12714)
推荐(0)
AttributeError: '_csv.reader' object has no attribute 'next'
摘要:我在使用pyhon3.4运行以下代码时报错:AttributeError: '_csv.reader' object has no attribute 'next' 解决方案: For version 3.2 and above Change: csv_file_object.next() To:
阅读全文
posted @
2016-09-29 08:21
pinweihelai
阅读(3556)
推荐(1)
AttributeError: type object '_io.StringIO' has no attribute 'StringIO'
摘要:python2导入StringIO模块,直接: 对于python3,StringIO和cStringIO模块已经没了,如果要使用的话,需要导入io模块: 你也可以导入six模块来使用StringIO: 或 例子:对于python2和python3都兼容: REF. [1]http://stackov
阅读全文
posted @
2016-09-28 17:34
pinweihelai
阅读(8526)
推荐(0)
sklearn学习笔记2
摘要:Text classifcation with Naïve Bayes In this section we will try to classify newsgroup messages using a dataset that can be retrieved from within scikit-learn. This dataset consists of around 19,000 n...
阅读全文
posted @
2016-09-27 17:03
pinweihelai
阅读(2320)
推荐(0)
sklearn学习笔记1
摘要:Image recognition with Support Vector Machines Modified Olivetti faces dataset. The original database was available from (now defunct) The version ret
阅读全文
posted @
2016-09-27 11:06
pinweihelai
阅读(695)
推荐(0)
隐语义模型LFM(latent factor model)
摘要:对于某个用户,首先得到他的兴趣分类,然后从分类中挑选他可能喜欢的物品。总结一下,这个基于兴趣分类的方法大概需要解决3个问题。 如何给物品进行分类? 如何确定用户对哪些类的物品感兴趣,以及感兴趣的程度? 对于一个给定的类。选择哪些属于这个类的物品推荐给用户,以及如何确定这些物品在一个类中的权重? 隐含语义分析技术采用基于用户行为统计的自动聚类,较好地解决了上面提出的问题...
阅读全文
posted @
2016-09-24 11:18
pinweihelai
阅读(4616)
推荐(0)
windows下python3.4安装scikit-learn
摘要:python3.4.0_64位下安装numpy-1.11.1 安装步骤: 1.在终端CMD中输入: python -m pip install -U pip 2.找到 下载的 numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whll所在的文件夹(用命令cd) 附下载
阅读全文
posted @
2016-09-23 08:48
pinweihelai
阅读(277)
推荐(0)
关联规则1
摘要:关联规则 项与项集 数据库中不可分割的最小单位信息称为项(或项目),用符号表示,项的集合称为项集。设集合是项集,中项目的个数为,则集合称为-项集。例如,集合{啤酒,尿布,奶粉}是一个3-项集。 事务 设是由数据库中所有项目构成的集合,事务数据库是由一系列具有唯一标识的事务组成的。每一个事务包含的项集都是的子集。例如,顾客在商场里同一次购买多种商品,这些购物信息在数据库中有一个唯一标识,用以表示...
阅读全文
posted @
2016-09-07 09:00
pinweihelai
阅读(699)
推荐(0)
关联规则
摘要:项与项集 数据库中不可分割的最小单位信息称为项(或项目),用符号i表示,项的集合称为项集。设集合是项集,中项目的个数为,则集合称为-项集。例如,集合{啤酒,尿布,奶粉}是一个3-项集。
阅读全文
posted @
2016-09-05 08:27
pinweihelai
阅读(217)
推荐(0)
决策树学习基决策树学习基本算法
摘要:决策树学习基本算法 输入:训练集; 属性集. 过程:函数 1: 生成结点node; 2: if 中样本全属于同一类别 then 3: 将node标记为类叶结点; return 4: end if 5: if 中样本在上取值相同 then 6: 将node标记为叶结点,其类别标记为中样本数最多的类; return 7: end if 8: 从中选择最优化分属性 9: fo...
阅读全文
posted @
2016-09-05 08:07
pinweihelai
阅读(3313)
推荐(0)