关于Programming Collective Intelligence中使用pydelicious.py的若干问题

由于本人使用的Python3.4,而随课程的代码则是在Python2.x中使用的,对应的pydelicious.py 文件也是对应Python2.x的,所以需要重新下载,所幸经过一番查找在gitHub网站中找到如下:

https://gist.github.com/takashi/2967f9c5ec8ebab5f622#file-pydelicious-py

但是由于在pydelicious.py中使用feedparser.py模块,所以同时可能需要更新feedparser.py模块,该模块可以在以下链接中下载:

https://pypi.python.org/pypi/feedparser

下载下来的文件包解压后,可通过在dos命令中使用以下命令安装:

Python setup.py install

注意需要使用cmd命令改变路径使其指向feedparser文件包所在路径中

使用以下测试,如果通过,则说明可以使用

import pydelicious
pydelicious.get_popular(tag='programming')

对应的结果如下:

[{'count': '', 'extended': '', 'dt': '', 'user': '', 'description': 'something went wrong', 'tags': '', 'href': '', 'hash': ''}]

至此忙了好几个钟终于搞定问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the enormous amount of data created by people on the Internet. With the sophisticated algorithms in this book, you can write smart programs to access interesting datasets from other web sites, collect data from users of your own applications, and analyze and understand the data once you've found it. Programming Collective Intelligence takes you into the world of machine learning and statistics, and explains how to draw conclusions about user experience, marketing, personal tastes, and human behavior in general -- all from information that you and others collect every day. Each algorithm is described clearly and concisely with code that can immediately be used on your web site, blog, Wiki, or specialized application. This book explains: * Collaborative filtering techniques that enable online retailers to recommend products or media * Methods of clustering to detect groups of similar items in a large dataset * Search engine features -- crawlers, indexers, query engines, and the PageRank algorithm * Optimization algorithms that search millions of possible solutions to a problem and choose the best one * Bayesian filtering, used in spam filters for classifying documents based on word types and other features * Using decision trees not only to make predictions, but to model the way decisions are made * Predicting numerical values rather than classifications to build price models * Support vector machines to match people in online dating sites * Non-negative matrix factorization to find the independent features in a dataset * Evolving intelligence for problem solving -- how a computer develops its skill by improving its own code the more it plays a game Each chapter includes exercises for extending the algorithms to make them more powerful. Go beyond simple database-backed applications and put the wealth of Internet data to work for you. 'Bravo! I cannot think of a better way for a developer to first learn these algorithms and methods, nor can I think of a better way for me (an old AI dog) to reinvigorate my knowledge of the details.' -- Dan Russell, Google 'Toby's book does a great job of breaking down the complex subject matter of machine-learning algorithms into practical, easy-to-understand examples that can be directly applied to analysis of social interaction across the Web today. If I had this book two years ago, it would have saved precious time going down some fruitless paths.' -- Tim Wolters, CTO, Collective Intellect

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值