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
ストリートスナップデータに 統計的ネットワーク分析の適用を試みた
Search
saltcooky
May 25, 2019
Science
0
760
ストリートスナップデータに 統計的ネットワーク分析の適用を試みた
TokyoR #78 LT
saltcooky
May 25, 2019
Tweet
Share
More Decks by saltcooky
See All by saltcooky
FIBA W杯の日本代表って組み合わせ次第で2次ラウンド行けたんじゃね?をデータで検証
saltcooky12
0
260
Rで有名絵画を安全に買いたい
saltcooky12
0
270
階層クラスタリングにおける仮説検定
saltcooky12
0
910
データドリブンな仮説検証のためのSelective Inference
saltcooky12
1
1.2k
Other Decks in Science
See All in Science
プロダクト開発を通して学んだナレッジマネジメントの哲学
sonod
0
140
拡散モデルの原理紹介
brainpadpr
3
4.5k
インフラだけではない MLOps の話 @事例でわかるMLOps 機械学習の成果をスケールさせる処方箋 発売記念
icoxfog417
2
510
Machine Learning for Materials (Lecture 5)
aronwalsh
0
660
As We May Interact: Challenges and Opportunities for Next-Generation Human-Information Interaction
signer
PRO
0
130
20分で分かる Human-in-the-Loop 機械学習におけるアノテーションとヒューマンコンピューターインタラクションの真髄
hurutoriya
4
2.2k
Raccoon Roundworm
uni_of_nomi
0
150
Machine Learning for Materials (Lecture 9)
aronwalsh
0
200
How were Quaternion discovered
kinakomoti321
2
1k
Science of Scienceおよび科学計量学に関する研究論文の俯瞰可視化_ポスター版
hayataka88
0
110
HAS Dark Site Orientation
astronomyhouston
0
5.3k
Machine Learning for Materials (Lecture 4)
aronwalsh
0
780
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
A Philosophy of Restraint
colly
203
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Scaling GitHub
holman
458
140k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
5
140
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Teambox: Starting and Learning
jrom
132
8.7k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Music & Morning Musume
bryan
46
6.1k
Transcript
ετϦʔτεφοϓσʔλʹ ౷ܭతωοτϫʔΫੳͷద༻ΛࢼΈͨ 5PLZP3 !TBMUDPPLZ
୭ʁ • !TBMUDPPLZ • 3ྺɿ͙Β͍͔ͳ • ۈઌɿݪ॓ʹ͋Δ*5ܥͷձࣾ • ࣄ༰ɿ3%తͳ෦ॺͰ3Λͬͨ ɾσʔλੳ
ׂ ɾػցֶश ׂ ɾલॲཧ ׂ • झຯɿϑΝογϣϯඒज़ؗ८Γ
ωοτϫʔΫੳͱ ਓؒؔɺاۀؒͷؔɺੜؒͷؔɺίϯϐϡʔλωοτϫʔΫ ͳͲͷؔߏΛੳ͢ΔάϥϑཧΛϕʔεͱͨ͠ੳख๏ (ग़య : https://www.slideshare.net/kashitan/tidygraphggraph) (https://www.amazon.co.jp/exec/obidos/ASIN/4320019288) ͜ΕͰษڧ͠·ͨ͠ ࠷ۙͷTokyoRͩͱ @kashitan
͞Μ͕ ൃදͨ͠Γͯͨ͠
ωοτϫʔΫੳ Α͋͘ΔͷωοτϫʔΫͷࢦඪͷࢉग़ߏͷநग़ - த৺ੑ ͲͷΑ͏ͳਓ͕த৺తͳਓ͔ - ίϛϡχςΟநग़ ͲͷΑ͏ͳάϧʔϓʹ͔Ε͍ͯΔ͔ - ૬ؔ
̎ͭͷωοτϫʔΫࣅ͍ͯΔ͔Ͳ͏͔ - ίΞநग़ ωοτϫʔΫͷີʹ݁߹ͨ͠த৺෦
ωοτϫʔΫͷ͋Δ̎ͷؒ J K ͷลɺ֬QJKͰ֬తʹൃੜ͢Δͱߟ͑Δ QJKύϥϝʔλВΛ࣋ͭϩδεςΟοΫϞσϧͰදݱͰ͖Δ J KͱK Lʹล͕ுΔ֬QJKºQKLͱදݱͰ͖Δ ౷ܭతωοτϫʔΫੳ K
L J
ࢦϥϯμϜάϥϑϞσϧ FYQPOFOUJBMSBOEPNHSBQINPEFM ɹϥϯμϜάϥϑ:ʹ͓͍ͯಛఆͷάϥϑߏZ͕ಘΒΕΔ֤֬ล͕ுΔ֬ͷ ྦྷͰදݱͰ͖Δͱߟ͑ͨϞσϧ ౷ܭతωοτϫʔΫੳ yʹ͋Δลͷ ύϥϝʔλ ن֨Խఆ ωοτϫʔΫશମ
ͷลͷൃੜ֬
ࢦϥϯμϜάϥϑϞσϧɹQ Ϟσϧ ɹϥϯμϜάϥϑ:ͷลͷൃੜ༷֬ʑͳཁૉʹΑΓ֬తʹܾ·ΔϞσϧ ౷ܭతωοτϫʔΫੳ ཁૉ ϊʔυͷಛྔɿྸɺॏΈɺ෦ॺʜ ลͷಛྔɿަࡍظؒɺΈʜ ϊʔυؒͷؔͷಛɿྸࠩɺۈଓظؒࠩʜ ߏతͳಛྔɿLελʔߏͷʜ ωοτϫʔΫͷߏཁ
ཁૉͷ
ద༻σʔλ
ద༻σʔλ ྸ ৬ۀ ࡱӨॴ ண༻ϒϥϯυ
Ϟνϕʔγϣϯ ลண༻ϒϥϯυͷ ڞ௨ ϒϥϯυͷબͷੑ࣭Λ දݱͰ͖ͳ͍͔ (͔ͳΓແཧཧ)
σʔλऔಘ • ($1্Ͱ%PDLFSΛ༻͍ͯ3TUVEJP 34FMFOJVNڥΛ࡞ • SWFTUQBDLBHFΛར༻ͯ͠εΫϨΠϐϯά • ϙΞιϯʹै͏ִؒͰϖʔδऔಘ ͳΜͱͳ͘
• ҰਓͷεφοϓσʔλΛऔಘ
σʔλ֬ೝ ண༻ϒϥϯυϥϯΩϯά ண༻ϒϥϯυωοτϫʔΫ
Ϟσϧ࡞(ྫ) ࢦϥϯμϜϞσϧTUBUOFUQBDLBHFͰ࣮͕Ͱ͖·͢ɻ # ωοτϫʔΫΦϒδΣΫτͷ࡞ network <- as.network(x = graph_matrix, directed
= FALSE, loops = FALSE) # ֤Τοδʹઆ໌ม(ྸ)ΛՃ network %v% "Age" <- Age # ֤ΤοδͷྸͷࠩΛܭࢉ diff.age <- abs(sweep(matrix(snap_info$Age, nrow = 638, ncol = 638), 2, snap_info$Age)) # Ϟσϧ࡞ model <- ergm( network ~ edges + edgecov(diff.age) + nodecov(“Age”) )
Ϟσϧ࡞ ࢦϥϯμϜϞσϧTUBUOFUQBDLBHFͰ࣮͕Ͱ͖·͢ɻ # ετϦʔτεφοϓͷp*Ϟσϧੜ snap_net_model <- ergm(snap_net ~ edges
+ # ลͷ nodecov(“Age")+ # ྸࠩ edgecov(diff.age) + # ྸ nodematch(“Occupation”) + # ৬ۀ nodematch("Point") ) # ࡱӨॴ
݁ՌΛݟͯΈΔ > summary(snap_net_model) < ུ > Monte Carlo MLE Results:
Estimate Std. Error MCMC % z value Pr(>|z|) edges -5.2066393 0.2692526 0 -19.337 <1e-04 *** edgecov.diff.age -0.0015763 0.0094767 0 -0.166 0.8679 nodecov.Age -0.0003136 0.0061215 0 -0.051 0.9591 nodematch.Occupation -0.0453192 0.0842853 0 -0.538 0.5908 nodematch.Point 0.1491330 0.0628610 0 2.372 0.0177 * < ུ > AIC: 13485 BIC: 13536 (Smaller is better.) ࡱӨॴ͕ลͷൃੜʹ Өڹ͍ͯͦ͠͏ AIC/BICͰมબՄೳ
݁ՌΛݟͯΈΔ ϞσϧΛ༻͍ͯγϛϡϨʔγϣϯ ࣮ઢɿγϛϡϨʔγϣϯʹΑΔ ശͻ͛ਤɿ࣮σʔλͷ ͯ·Γྑ͘ͳ͍ʜ
·ͱΊ • ࠓճͷεφοϓใͰɺண༻ϒϥϯυͷؔੑΛࢦϥϯμϜ άϥϑϞσϧͰ͏·͘දݱͰ͖·ͤΜͰͨ͠ • ౷ܭతωοτϫʔΫੳ݁ߏ໘ന͍ͷͰɺษڧͯ͠ΈͯͶ • ࢲ౷ܭతωοτϫʔΫੳͷษڧଓ͚͍͖͍ͯͨͱࢥ͍·͢ • ͳͷͰɺৄ͍͠ํ͝ڭतئ͍͠·͢
• ڞཱग़൛ʮωοτϫʔΫੳୈ̎൛ʯླஶ IUUQTXXXBNB[PODPKQFYFDPCJEPT"4*/ • \UJEZHSBQI^ͱ\HHSBQI^ʹΑΔϞμϯͳωοτϫʔΫੳ IUUQTXXXTMJEFTIBSFOFULBTIJUBOUJEZHSBQIHHSBQI • 3ʹΑΔωοτϫʔΫੳΛ·ͱΊ·ͨ͠ωοτϫʔΫͷࢦඪฤ IUUQTRJJUBDPNTBMUDPPLZJUFNTFEDFEGCDE •
3ʹΑΔωοτϫʔΫੳΛ·ͱΊ·ͨ͠౷ܭతωοτϫʔΫੳฤ IUUQTRJJUBDPNTBMUDPPLZJUFNTCBFGDFCGBDFBDCGD ࢀߟ