Skip to content

hustqy/rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#新闻推荐系统

支持三种推荐模型:
0.content-based recommendation
1.user2user 模型
2.item2item模型

##系统运行 命令:usage: version.py [-h] [-train <trainfile>] [-test <testfile>] [-m <method>] [-u <userid>]

optional arguments:
-h, --help

show this help message and exit
-train <trainfile>, --trainfile <trainfile>
please specify train data file
-test <testfile>, --testfile <testfile>
please specify test data file
-m <method>, --method <method>
please specify method to recommend: 0 for user2user;
1 for term2term;2 for others
-u <userid>, --userid <userid>
please specify the user to recommend

for example:version.py -train /Users/qiaoyang/PycharmProjects/user_click_data.txt -test /Users/qiaoyang/PycharmProjects/testing.txt -m 1 -u 4858290
使用新闻文件user_click_data.txt作训练,testing.txt存储给用户推荐的新闻,使用user2user模型,给出用户4858290的推荐新闻。

##系统模块组成

  • Core.py 总控模块 调用docs模块处理新闻数据,然后再使用user,item等模型实现推荐。
  • docs.py 数据处理模块
    • doc.py 处理新闻数据返回一系列News组成的数组
    • new.py News类包含userid, newsid, scan_time, title, tags(提取的关键词)等信息
    • tfidf Tfidf类 提取文档的关键词

About

recommender system for news

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages