Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
数据挖掘从0到1
Search
Ryan Lv
April 14, 2015
Programming
0
200
数据挖掘从0到1
2015-04-14 Shanghai Ruby Tuesday
title: 暴走漫画数据挖掘从0到1
speaker: 丁彦
company: 暴走漫画
Ryan Lv
April 14, 2015
Tweet
Share
More Decks by Ryan Lv
See All by Ryan Lv
Understanding MySQL Explain
xiaoronglv
1
1.1k
Memcached: consistent hashing, LRU, and memory allocation
xiaoronglv
0
840
Anki Basic
xiaoronglv
0
1k
Git Branch Model
xiaoronglv
0
130
Other Decks in Programming
See All in Programming
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
180
Developing static sites with Ruby
okuramasafumi
1
340
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
210
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
3.6k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
760
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
520
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
340
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
580
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
110
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
180
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
15
3.8k
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
220
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
YesSQL, Process and Tooling at Scale
rocio
174
15k
エンジニアに許された特別な時間の終わり
watany
106
220k
Discover your Explorer Soul
emna__ayadi
2
1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
41
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
27
Visualization
eitanlees
150
16k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
200
Unsuck your backbone
ammeep
671
58k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
360
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