Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
数据挖掘从0到1
Search
Ryan Lv
April 14, 2015
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
数据挖掘从0到1
2015-04-14 Shanghai Ruby Tuesday
title: 暴走漫画数据挖掘从0到1
speaker: 丁彦
company: 暴走漫画
Ryan Lv
April 14, 2015
More Decks by Ryan Lv
See All by Ryan Lv
Understanding MySQL Explain
xiaoronglv
1
1.2k
Memcached: consistent hashing, LRU, and memory allocation
xiaoronglv
0
880
Anki Basic
xiaoronglv
0
1.1k
Git Branch Model
xiaoronglv
0
140
Other Decks in Programming
See All in Programming
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
140
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
110
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
7.5k
The Rails Doctrine Decade
koic
2
510
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
450
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.4k
残高管理から台帳サービスへの進化
artoy
0
170
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
Kubernetes祭り #2 OP/ED
bells17
0
100
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.5k
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
1
550
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Facilitating Awesome Meetings
lara
57
7.2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Visualization
eitanlees
153
17k
Designing for Performance
lara
611
70k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
720
From π to Pie charts
rasagy
1
390
Discover your Explorer Soul
emna__ayadi
2
1.3k
Transcript
暴⾛走漫画数据挖掘从0到1 Michael Ding@暴⾛走漫画(上海)
关于我 ⽣生物信息学 硕⼠士 《Git版本控制管理(第2版) 》 第⼆二版 译者 南京 LUG 管理员
代码托管服务(集盒)创始⼈人 微搜索(TinySou) 创始⼈人 暴⾛走漫画 技术总监(数据挖掘,上海技术部) 2
内容概要 搜索服务 相关理论与原理 核⼼心问题 实践 推荐服务 相关理论与原理 ⼀一般步骤 协同过滤为例 未来与挑战
3
构建搜索服务 搜索是寻找资源的最好⽅方式 4
搜索服务的基本流程 5 这⾥里的Data 是数据源(即要搜的东⻄西),可 以是数据库,可以是⽂文件系统,也可以是 互联⺴⽹网(⾕谷歌) 特别注意的是这⾥里的“索引”过程,搜索引 擎并不会直接搜索数据源,⽽而要先将数据 源的内容索引到搜索引擎中 索引
6 索引结构: 倒排表(Inverted Index)
索引(过程)的核⼼心问题 中⽂文分词 统计语⾔言模型 ⼯工程实现(效果:字典,效率:算法) 分词策略(重复索引,组合分词) 中⽂文分词 (英⽂文分词) 拼⾳音分词 n-gram 7
搜索的核⼼心问题 索引查询 倒排表查询,结果取并集(Union),作为候选 结果排序 TF-IDF/BM25 vector space model boost(⾃自定义因素) 机器学习
综合以上 8
TF-IDF/BM25 IDF idf(t) = 1 + log ( numDocs /
(docFreq + 1)) TF tf(t in d) = √frequency BM25 bm25(t in d) = tf(t in d) * (k + 1)/(tf(t in d) + k * (1-b+b*|D|/avgdl) Field-length Norm norm(d) = 1 / √numTerms Weight weight(t in d) = tf * idf * norm (using tf-idf) weight(t in d) = bm25 * if * norm (using bm25) 9
vector space model 原理 查询语句以及每个候选由⼀一个 vector 表⽰示, vector 中的每个值是 term
的 weight 值 计算每个候选 vector 与 查询 vector 的 cosine 值,得分⾼高者排名⾼高 举例: 查询是: 暴⾛走|⼤大|事件 q = [0.8, 0.1, 0.6] 有两个候选: doc1:暴⾛走|漫画 v1 = [0.82, 0, 0] doc2:暴⾛走|事件 v2 = [0.82, 0, 0.63] 计算 cosine: cos(q, v1) < cos(q, v2) 结论 doc2 排名⾼高 10
Boost 排序的外部因素 PageRank 竞价排名 机器学习 暴漫策略: 浏览量/播放量 min(2.0, log(1+0.1v) 和cos(v,
q) 相加 11
⼯工程实现 基于 Elasticsearch 做索引 设计索引结构(分词,相似策略,norm 策略) 排序结果⼲干预 基于 Elasticsearch 做排序(⽂文本相关性
+ boost) 跟踪⽤用户点击⾏行为,利⽤用机器学习调整隐藏因素 12
构建推荐服务 推荐是移动应⽤用的重要⽤用户留存⼿手段 13
主要的推荐⽅方法 Content-Based 你在看⾔言情⼩小说1,可能也会看⾔言情⼩小说2 Item-Hierarchy 你买了打印机,所以你可能也要买墨盒 Collaborative Filtering - Item-based 《蝙蝠侠》和《变形⾦金刚》受众很相似,你看了《蝙蝠侠》,可能也会看《变形⾦金
刚》 Collaborative Filtering - User-based 你和XXX的观影⼜⼝口味很像,XXX最近看了“暴⾛走⼤大事件”,你可能也会看 Graph based 你的不少微信好友都买喜欢王尼玛,你可能也会喜欢王尼玛 Model based 说不清楚的机器学习,告诉我正负样本,我会越来越了解你 14
⼀一般步骤 定义问题,选择推荐⽅方法(组合) 推荐帖⼦子,结合 content-based 和 collaborative filtering 相似度计算 cosine similarity
相似矩阵 预测 给定⼀一个⽤用户,预测他对帖⼦子的兴趣 找出预测出的兴趣最⾼高的帖⼦子,倒序返回 15
协同过滤(item-based) 16 user 0 user 1 user 2 user 3
user 4 article 0 1 1 article 1 1 2 2 article 2 1 1 article 3 1 1 2 article 4 2 1
对于 user0, 我们该推荐什么? 17
计算 article 之间的相似矩阵 18
为候选article打分 19
What’s Next Cached(速度) 异步IO Distributed(速度,计算量) Machine Learning(更加智能) Julia? 20
谢谢 邮箱:
[email protected]
技术博客:http://freestorm.org 微博:Michael爱开源 21