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
word2vecで女性向けQ&Aサイトを解析してみた
Search
tatsushim
June 17, 2015
Research
0
6.3k
word2vecで女性向けQ&Aサイトを解析してみた
2015/06/10
IVS CTO NightのLTで発表したプレゼン資料です。
word2vecにmamariQ内のテキストを使用してみました。
tatsushim
June 17, 2015
Tweet
Share
More Decks by tatsushim
See All by tatsushim
DockerとAmazon SageMakerで実現した機械学習システムのプロダクション移行
tatsushim
0
27k
コミュニティサービスにおける機械学習のためのアノテーション
tatsushim
0
2.1k
日本のママをコンテナで支える
tatsushim
1
3.1k
コネヒトが考える技術選択の仕方について
tatsushim
0
22k
コネヒトが考えるサービスづくりに必要な技術とその考え方について
tatsushim
2
3.1k
独身男性のためのデータドリブン講座
tatsushim
0
6.8k
Other Decks in Research
See All in Research
SSII2025 [SS1] レンズレスカメラ
ssii
PRO
2
780
Streamlit 総合解説 ~ PythonistaのためのWebアプリ開発 ~
mickey_kubo
1
760
Ad-DS Paper Circle #1
ykaneko1992
0
5.2k
MGDSS:慣性式モーションキャプチャを用いたジェスチャによるドローンの操作 / ec75-yamauchi
yumulab
0
190
インドネシアのQA事情を紹介するの
yujijs
0
200
作業記憶の発達的特性が言語獲得の臨界期を形成する(NLP2025)
chemical_tree
2
560
言語モデルによるAI創薬の進展 / Advancements in AI-Driven Drug Discovery Using Language Models
tsurubee
2
350
Adaptive Experimental Design for Efficient Average Treatment Effect Estimation and Treatment Choice
masakat0
0
120
Adaptive fusion of multi-modal remote sensing data for optimal sub-field crop yield prediction
satai
3
170
Introduction of NII S. Koyama's Lab (AY2025)
skoyamalab
0
430
Vision Language Modelと完全自動運転AIの最新動向
tsubasashi
2
610
Mathematics in the Age of AI and the 4 Generation University
hachama
0
150
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
76
9.4k
The Language of Interfaces
destraynor
158
25k
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Site-Speed That Sticks
csswizardry
7
590
The World Runs on Bad Software
bkeepers
PRO
68
11k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
A better future with KSS
kneath
239
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Scaling GitHub
holman
459
140k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Transcript
word2vecͰঁੑ͚QˍA αΠτΛղੳͯ͠Έͨ Tatsuro Shimada <
[email protected]
> tatsushim @ Connehito, Inc
Connehito Inc. ౡాୡ࿕ʢ͠·ͩͨͭΖ͏ʣ • Connehito, Inc CTO • Πϯϑϥ͔Βϑϩϯτ·Ͱ •
͋ͱ͓՛ࢠͷങ͍ग़͠ PROFILE @tatsushim 2
ϚϚϦͱʁ Connehito Inc. 3
Connehito Inc. ϚϚϦjp (❨web)❩ ϚϚϦ2 (❨ΞϓϦ)❩ ϚϚϦKQ / ϚϚϦ2 ϝσΟΞ
ίϛϡχςΟ 4
Connehito Inc. ࣭ͷճ ˋ ճ͕ͭ͘·Ͱ ҎԼ ΞϓϦͷࡏ࣌ؒ Ҏ্ ѹతͳαʔϏεͷ
+VO +VM "VH 4FQ 0DU /PW %FD +BO 'FC લ݄ൺˋ ྦྷܭߘ ৷ɾग़࢈ͰΉਓͷ ਓʹਓ͕݄̍ΞΫηε 5
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 6 λʔήοτ ࢲ
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 7 ঁੑ λʔήοτ ࢲ
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 8 ঁੑ ϚϚ λʔήοτ ࢲ
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 9 ঁੑ ϚϚ λʔήοτ ࢲ
৷ ग़࢈
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 10 ঁੑ ϚϚ λʔήοτ ࢲ
உੑ ৷ ग़࢈
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 11 ঁੑ ϚϚ λʔήοτ ࢲ
உੑ ৷ ग़࢈ ಠΓ
Connehito Inc. ϚϚϦKQ / ϚϚϦ2 12 ঁੑ ϚϚ λʔήοτ ࢲ
உੑ ಠΓ ৷ ग़࢈ Ͱ͖ͳ͍
ʘ(^o^)ʗ
ʘ(^o^)ʗ Ϣʔβʔͷ͜ͱཧղ͍ͨ͠ʂ
15
16 word2vec
None
Connehito Inc. • Tomas Mikolovࢯ (࣌Google, ݱFacebook)͕ఏҊ • ୯ޠಉ࢜ͷؔੑΛϕΫτϧͱͯ͠දݱ •
୯ޠͷྨࣅͷܭࢉ͠Ҿ͖͕Մೳ word2vecͱʁ 18
19
20 ۩ମྫΛݟͯΈΑ͏
word2vecͷදతͳ2ͭͷ͍ํ Connehito Inc. 21
Display similar words Connehito Inc. 22
None
ྨٛޠ
Interesting properties of the word vectors Connehito Inc. 25
Connehito Inc. 26 word2vecͷྫ vector(‘France')
Connehito Inc. 27 word2vecͷྫ - vector(‘Paris') vector(‘France')
Connehito Inc. 28 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) vector(‘France')
Connehito Inc. 29 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France')
Connehito Inc. 30 word2vecͷྫ vector(‘Paris')
Connehito Inc. 31 word2vecͷྫ - vector(‘France') vector(‘Paris')
Connehito Inc. 32 word2vecͷྫ - vector(‘France') + vector(‘Italy’) vector(‘Paris')
Connehito Inc. 33 word2vecͷྫ - vector(‘France') + vector(‘Italy’) = vector('Rome')
vector(‘Paris')
Connehito Inc. 34 word2vecͷྫ vector(‘king')
Connehito Inc. 35 word2vecͷྫ - vector(‘man') vector(‘king')
Connehito Inc. 36 word2vecͷྫ - vector(‘man') + vector(‘woman’) vector(‘king')
Connehito Inc. 37 word2vecͷྫ - vector(‘man') + vector(‘woman’) = vector('queen')
vector(‘king')
ཧͯ͠ΈΔ Connehito Inc. 38
Connehito Inc. 39 word2vecͷྫ - vector(‘Paris') vector(‘France')
Connehito Inc. 40 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) vector(‘France')
Connehito Inc. 41 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France')
Connehito Inc. 42 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France')}
Connehito Inc. 43 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ }
Connehito Inc. 44 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } +
Connehito Inc. 45 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } } +
Connehito Inc. 46 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } } ౦ژ +
Connehito Inc. 47 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } } ౦ژ + =
Connehito Inc. 48 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } } ౦ژ + = }
Connehito Inc. 49 word2vecͷྫ - vector(‘Paris') + vector(‘Tokyo’) = vector('Japan')
vector(‘France') ͋ΔࢢΛटͱ͢Δࠃ } } ౦ژ + = }౦ژΛटͱ͢Δࠃ
50
51 mamariQͰword2vecͯ͠ΈΔ
None
୯ޠͷҙຯΛද͢୯ޠ Connehito Inc. 53
Connehito Inc. 54 ʮಈʯin mamariQ Word: ಈ Word Cosine distance
------------------------------------------------------------------------ ҙ 0.527825 ϙίϙί 0.516658 ҧײ 0.432082 ಈ͖ 0.430563 ͠Όͬ͘Γ 0.406297 ͙͍ͬͨ͘͢ 0.386457 ಈ͍ 0.383030 ى෬ 0.381906 ϙίο 0.377959
Connehito Inc. 55 ʮυΫϯυΫϯʯin mamariQ Word: υΫϯυΫϯ Word Cosine distance
------------------------------------------------------------------------ ຺ଧͭ 0.454460 ϙίο 0.425674 Ͳ͘Ͳ͘ 0.425287 ϐΫο 0.418931 ಥͬுΔ 0.417948 ϐΫϐΫ 0.415464 લଆ 0.413287 ͭͬͺΔ 0.412516
Connehito Inc. 56 ʮೕ৯ʯin mamariQ Word: ೕ৯ Word Cosine distance
------------------------------------------------------------------------ ख͔ͮΈ 0.472250 ͔ͭΈ 0.445568 ॏ౬ 0.432616 ͓͔Ώ 0.425068 τΠτϨ 0.415463 ͨΜͺ࣭͘ 0.412253 ϕϏʔμϊϯ 0.393488 λϯύΫ࣭ 0.392157 ৯ࡐ 0.390477
୯ޠͱ୯ޠͷؔੑ Connehito Inc. 57
Connehito Inc. 58 vector(‘ެཱ') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 59 - vector(‘ଉࢠ') vector(‘ެཱ') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 60 - vector(‘ଉࢠ') + vector(‘່’) vector(‘ެཱ') ୯ޠͷ໘ന͍ؔੑ in
mamariQ
Connehito Inc. 61 - vector(‘ଉࢠ') + vector(‘່’) = vector('ࢲཱ') vector(‘ެཱ')
୯ޠͷ໘ന͍ؔੑ in mamariQ
62
63 ঁͷࢠͷํ͕ࢲཱΛݕ౼͢Δʁ
Connehito Inc. 64 vector(‘νϡʔϋΠ') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 65 - vector(‘͓͞Μ') vector(‘νϡʔϋΠ') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 66 - vector(‘͓͞Μ') + vector(‘͓͞Μ’) vector(‘νϡʔϋΠ') ୯ޠͷ໘ന͍ؔੑ in
mamariQ
Connehito Inc. 67 - vector(‘͓͞Μ') + vector(‘͓͞Μ’) = vector('Ϗʔϧ') vector(‘νϡʔϋΠ')
୯ޠͷ໘ന͍ؔੑ in mamariQ
68
69 உੑͷํ͕Ϗʔϧ͖ʁ
Connehito Inc. 70 vector(‘ՄѪ͍') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 71 - vector(‘ଉࢠ') vector(‘ՄѪ͍') ୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 72 - vector(‘ଉࢠ') + vector(‘່’) vector(‘ՄѪ͍') ୯ޠͷ໘ന͍ؔੑ in
mamariQ
Connehito Inc. 73 - vector(‘ଉࢠ') + vector(‘່’) = vector('ՄѪ͍') vector(‘ՄѪ͍')
୯ޠͷ໘ന͍ؔੑ in mamariQ
Connehito Inc. 74 - vector(‘ଉࢠ') + vector(‘່’) = vector('ՄѪ͍') vector(‘ՄѪ͍')
୯ޠͷ໘ന͍ؔੑ in mamariQ ʊਓਓਓਓਓʊ ʼɹՄѪ͍ɹʻ ʉY^Y^Y^Y
None
ͨͩͷόΧ
ຊޠʹword2vecదԠ͢ΔࡍͷTips Connehito Inc. 77
Connehito Inc. 78 ຊޠʹword2vecదԠ͢ΔࡍͷTips
Connehito Inc. • ࣙॻʹmecab-ipadic-neologdΛ͏ - Web্ͷݴޠࢿݯ͔Βಘͨ৽ޠʹରԠ 79 ຊޠʹword2vecదԠ͢ΔࡍͷTips
Connehito Inc. • ࣙॻʹmecab-ipadic-neologdΛ͏ - Web্ͷݴޠࢿݯ͔Βಘͨ৽ޠʹରԠ 80 ຊޠʹword2vecదԠ͢ΔࡍͷTips • ۀքݻ༗ͷϫʔυͪΌΜͱొ͢Δ
- Ex. 24w3d = ৷͔Β24िͱ3
Connehito Inc. • ࣙॻʹmecab-ipadic-neologdΛ͏ - Web্ͷݴޠࢿݯ͔Βಘͨ৽ޠʹରԠ 81 ຊޠʹword2vecదԠ͢ΔࡍͷTips • ύϥϝʔλௐ
- Ex. αʔϏεʹ߹Θͤͨwindow sizeΛ • ۀքݻ༗ͷϫʔυͪΌΜͱొ͢Δ - Ex. 24w3d = ৷͔Β24िͱ3
82
83 ݁ہԿʹ͑Δͷ͔ʁ
Connehito Inc. 84 Ԡ༻ઌ
Connehito Inc. • ྨٛޠݕग़ 85 Ԡ༻ઌ
Connehito Inc. • ྨٛޠݕग़ 86 • QˍAίϛχϡχςΟͰQʹରͯ͠࠷ྑ ͍ճΛܾΊΔͱ͖ͷfeatureʹ͏ͱ͔(࣮ ࡍԠ༻ͨ͠จ͕͋Δ) Ԡ༻ઌ
Connehito Inc. • ྨٛޠݕग़ 87 • QˍAίϛχϡχςΟͰQʹରͯ͠࠷ྑ ͍ճΛܾΊΔͱ͖ͷfeatureʹ͏ͱ͔(࣮ ࡍԠ༻ͨ͠จ͕͋Δ) •
͍͔ͭ͘Ծઆ͕͋ΔͷͰɺ্ख͘ߦͬͨΒ จʹͯ͠ൃ৴͍͖ͯ͠·͢ Ԡ༻ઌ
͜͜·Ͱ͕word2vecͷ͓ Connehito Inc. 88
Connehito Inc. • Ҏ্͕ɺword2vecΛͬͯΈ͓ͨͰ͢ 89 • IVS CTO NightॳࢀՃͰϫΫϫΫͯ͠·͢ •
͜͏͍͏RˍDΛΈΜͳ͍ͭͬͯɺͲ͏ औΓೖΕͯΔͷ͔Γ͍ͨ • ͜ͷޙྑ͔ͬͨΒ͓͍ͤͯͩ͘͞͞ վΊ͓ͯٓ͘͠ئ͍͠·͢ʂ
Connehito Inc. • Ҏ্͕ɺword2vecΛͬͯΈ͓ͨͰ͢ 90 • IVS CTO NightॳࢀՃͰϫΫϫΫͯ͠·͢ •
͜͏͍͏RˍDΛΈΜͳ͍ͭͬͯɺͲ͏ औΓೖΕͯΔͷ͔Γ͍ͨ • ͜ͷޙྑ͔ͬͨΒ͓͍ͤͯͩ͘͞͞ վΊ͓ͯٓ͘͠ئ͍͠·͢ʂ ͝ਗ਼ௌ༗͏͍͟͝·ͨ͠ʂ