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
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R ...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenji Saito
PRO
November 30, 2024
Technology
84
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R を用いた分析(補講) (2) — 人工データの生成 / Analysis using R (supplementary) (2) - Generating artificial data
早稲田大学大学院経営管理研究科「企業データ分析」2024 冬のオンデマンド教材 第12回で使用したスライドです。
Kenji Saito
PRO
November 30, 2024
More Decks by Kenji Saito
See All by Kenji Saito
責任2.0 ∼ AI が主体となる世界で ∼ / Responsibility 2.0: In a World Where AI Takes Responsibilities
ks91
PRO
0
65
発表と総括 / Presentations and Summary
ks91
PRO
0
230
インシデントレスポンス演習II / Incident Response Exercise II
ks91
PRO
0
110
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
190
戦略と安全保障 / Strategy and Security
ks91
PRO
0
120
ローカル LLM とコンピューティングの脱領土化 / Local LLMs and Deterritorialization of Computing
ks91
PRO
0
43
サイバー戦の現在と未来 / The Present and Future of Cyber Warfare
ks91
PRO
0
100
金融の未来を考える / Thinking About the Future of Finance
ks91
PRO
0
220
AI Agentification: Current State and the Changes Ahead
ks91
PRO
0
63
Other Decks in Technology
See All in Technology
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
140
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.7k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
6.2k
[MIRU26] Open-Vocabulary Intention-Guided Object Detection in Diverse Scenes
keio_smilab
PRO
0
140
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
1.3k
サイバー捜査員研修(後半)
nomizone
1
760
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
230
組織にどうSREを根付かせるか?〜IVRyの場合〜
abnoumaru
0
330
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
220
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
Webアクセシビリティ入門 2026
recruitengineers
PRO
2
340
SnowflakeCoCoでデータエンジニアリング!
foursue
0
180
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
400
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
380
Utilizing Notion as your number one productivity tool
mfonobong
4
510
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
350
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
610
Visualization
eitanlees
152
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.2k
Transcript
Boxes and whiskers — generated by Stable Diffusion XL v1.0
2024 12 R ( ) (2) — (WBS) 2024 12 R ( ) (2) — — 2024-11 – p.1/14
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2024-winter 2024 12 R ( ) (2) — — 2024-11
– p.2/14
( 20 ) 1 • 2 R • 3 •
4 • 5 • 6 ( ) • 7 (1) • 8 (2) • 9 R ( ) (1) — Welch • 10 R ( ) (2) — χ2 • 11 R ( ) (1) — • 12 R ( ) (2) — • 13 GPT-4 14 GPT-4 15 ( ) LaTeX Overleaf 8 (12/16 ) / (2 ) OK / 2024 12 R ( ) (2) — — 2024-11 – p.3/14
N(µ, σ2) ρ 2 ( : ˆ y = a
+ b1 x1 + b2 x2 + e ) 2024 12 R ( ) (2) — — 2024-11 – p.4/14
N(µ, σ2) “rnorm()” set.seed(173205) # # N(50, 10^2) 100 x
<- rnorm(n=100, mean=50, sd=10) # x # hist(x) mean(x) sd(x) 2024 12 R ( ) (2) — — 2024-11 – p.5/14
Histogram of x x Frequency 10 20 30 40 50
60 70 80 0 5 10 15 20 25 30 35 mean(x) : 50.06994 sd(x) : 10.30096 2024 12 R ( ) (2) — — 2024-11 – p.6/14
ρ 2 (1/2) MASS “mvrnorm()” “ .R” # r =
0.9 # t = 3.7 # r = 15.2 # t = 7.5 # = -0.5 # <- matrix(c( r^2, * t * r, * r * t, t^2 ), nrow=2) 2024 12 R ( ) (2) — — 2024-11 – p.7/14
“mvrnorm()” = S xx S xy S xy S yy
= S xx rS x S y rS x S y S yy ( r = S xy S x S y ) 2 x, y x, y, z, . . . 2024 12 R ( ) (2) — — 2024-11 – p.8/14
ρ 2 (2/2) MASS “mvrnorm()” “ .R” # set.seed(28284) <-
mvrnorm(n=100, mu=c( r, t), Sigma= ) <- pmin(pmax( [,1], 13.0), 19.9) <- pmin(pmax( [,2], 0.0), 20.0) “ [,1]” “ [,2]” plot 2024 12 R ( ) (2) — — 2024-11 – p.9/14
0 5 10 15 20 13 14 15 16 17
18 ㈇ࡢ┦㛵ࡢ 㐌ᙜࡓࡾࡢㄢእ㐠ື㛫 100m㉮ࡢࢱ࣒ (⛊) r : -0.5932345 ( ) -0.5884094 ( ) 2024 12 R ( ) (2) — — 2024-11 – p.10/14
(1/2) “ .R” n <- 50 # a <- 49.4
# ( (158cm ) ) # r_father <- 0.306 mean_father <- 168.78 sd_father <- 3.2 # r_mother <- 0.37 mean_mother <- 155.32 sd_mother <- 2.45 2024 12 R ( ) (2) — — 2024-11 – p.11/14
(2/2) “ .R” <- round(rnorm(n=n, mean=mean_father, sd=sd_father), digits=1) <- round(rnorm(n=n,
mean=mean_mother, sd=sd_mother), digits=1) e <- rnorm(n=n, mean=0, sd=2.8) # <- round(a + r_father * + r_mother * + e, digits=1) 1 “round()” plot 2024 12 R ( ) (2) — — 2024-11 – p.12/14
ፉ㌟㛗 160 165 170 175 152 156 160 164 160
165 170 175 ∗㌟㛗 152 156 160 164 150 154 158 150 154 158 ẕ㌟㛗 : 34.2484 : 0.3545 : 0.4137 : 0.2831 2024 12 R ( ) (2) — — 2024-11 – p.13/14
2024 12 R ( ) (2) — — 2024-11 –
p.14/14