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
780
ストリートスナップデータに 統計的ネットワーク分析の適用を試みた
TokyoR #78 LT
saltcooky
May 25, 2019
Tweet
Share
More Decks by saltcooky
See All by saltcooky
FIBA W杯の日本代表って組み合わせ次第で2次ラウンド行けたんじゃね?をデータで検証
saltcooky12
0
270
Rで有名絵画を安全に買いたい
saltcooky12
0
280
階層クラスタリングにおける仮説検定
saltcooky12
0
930
データドリブンな仮説検証のためのSelective Inference
saltcooky12
1
1.2k
Other Decks in Science
See All in Science
理論計算機科学における 数学の応用: 擬似ランダムネス
nobushimi
1
370
はじめての「相関と因果とエビデンス」入門:“動機づけられた推論” に抗うために
takehikoihayashi
17
7k
Mechanistic Interpretability の紹介
sohtakahashi
0
410
Inductive-bias Learning: 大規模言語モデルによる予測モデルの生成
fuyu_quant0
0
120
ultraArmをモニター提供してもらった話
miura55
0
200
マクロ経済学の視点で、財政健全化は必要か
ryo18cm
1
100
WeMeet Group - 採用資料
wemeet
0
3.7k
The Incredible Machine: Developer Productivity and the Impact of AI
tomzimmermann
0
420
Factorized Diffusion: Perceptual Illusions by Noise Decomposition
tomoaki0705
0
270
ベイズのはなし
techmathproject
0
340
ACL読み会2024@名大 REANO: Optimising Retrieval-Augmented Reader Models through Knowledge Graph Generation
takuma_matsubara
0
100
いまAI組織が求める企画開発エンジニアとは?
roadroller
2
1.3k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
We Have a Design System, Now What?
morganepeng
51
7.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
What's in a price? How to price your products and services
michaelherold
243
12k
GitHub's CSS Performance
jonrohan
1030
460k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Fireside Chat
paigeccino
34
3.1k
A Philosophy of Restraint
colly
203
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Making the Leap to Tech Lead
cromwellryan
133
9k
Into the Great Unknown - MozCon
thekraken
33
1.5k
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 ࢀߟ