SlideShare ist ein Scribd-Unternehmen logo
1 von 69
Downloaden Sie, um offline zu lesen
第353回 確率統計カフェ
「乱数!!」
2016/5/7
Ken ichi Matsui (@kenmatsu4)
http://www.slideshare.net/matsukenbook
https://twitter.com/_inundata/status/616658949761302528
https://twitter.com/_inundata/status/616658949761302528
x1, x2, · · · , xn xn+1
M
xj+1 := axj + c mod M
a = 1103515245, c = 12345, M = 231
231
xj+1 := axj + c mod M
231
Ma = 1103515245, c = 12345, M = 231
219937
1
xk+n := xk+m (xk
u
| xk+1
l
)A k = 0, 1, . . .
219937
1
xk+n := xk+m (xk
u
| xk+1
l
)A k = 0, 1, . . .
A =
✓
0 Iw 1
aw 1 (aw 2, . . . , a0)
◆
w
=
0
B
B
B
B
B
B
B
B
B
@
0 1 · · · 0
...
0
...
...
...
...
0 0 · · · 1
aw 1 aw 2 · · · a0
1
C
C
C
C
C
C
C
C
C
A
1  m < n
0  r  w 1
xA =
(
shiftright(x)
shiftright(x) + a
xi = (xi(w 1), xi(w 2), · · · , xi(0)) xi(j) 2 {0, 1}
y := x ((x >> u)&d)
y := y ((y << s)&b)
y := y ((y << t)&c)
z := y (y >> l)
x
y := x ((x >> u)&d)
y := y ((y << s)&b)
y := y ((y << t)&c)
z := y (y >> l)
(w, n, m, r) = (32, 624, 397, 31)
a = 9908B0DF16
(u, d) = (11, FFFFFFFF16)
(s, b) = (7, 9D2C568016)
(t, c) = (15, EFC6000016)
l = 18
xk+n := xk+m (xk
u
| xk+1
l
)A k = 0, 1, . . .
A =
✓
0 Iw 1
aw 1 (aw 2, . . . , a0)
◆
w = 32, n = 624, m = 397, r = 3
nw r = 19937
2nw r
1
219937
1
w = 32, n = 624, m = 397, r = 31
y := x ((x >> u)&d)
y := y ((y << s)&b)
y := y ((y << t)&c)
z := y (y >> l)
(w, n, m, r) = (32, 624, 397, 31)
a = 9908B0DF16
(u, d) = (11, FFFFFFFF16)
(s, b) = (7, 9D2C568016)
(t, c) = (15, EFC6000016)
l = 18
xk+n := xk+m (xk
u
| xk+1
l
)A k = 0, 1, . . .
A =
✓
0 Iw 1
aw 1 (aw 2, . . . , a0)
◆
w = 32, n = 624, m = 397, r = 3
nw r = 19937
2nw r
1
219937
1
w = 32, n = 624, m = 397, r = 31
x = 1 x = 0
f(x; p) =
8
<
:
p if x = 1,
1 p if x = 0.
f(x; p) = px
(1 p)1 x
, x = {0, 1}
x
p
p
1 p
http://www.math.wm.edu/~leemis/2008amstat.pdf
確率分布
曼荼羅
76個
有り〼
P(X = x) = px
(1 p)1 x
(x = 0, 1)
p	
  =	
  0.7	
  
trial_size	
  =	
  10000	
  
set.seed(71)	
  
data	
  <-­‐	
  rbern(trial_size,	
  p)	
  
dens	
  <-­‐	
  data.frame(y=c((1-­‐p),p)*trial_size,	
  x=c(0,	
  1))	
  
ggplot()	
  +	
  
	
  	
  	
  	
  layer(data=data.frame(x=data),	
  mapping=aes(x=x),	
  geom="bar",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  stat="bin",	
  bandwidth=0.1	
  
)	
  +	
  layer(data=dens,	
  mapping=aes(x=x,	
  y=y),	
  geom="bar",	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  stat="identity",	
  width=0.05,	
  fill="#777799",	
  alpha=0.7)	
  
P(X = x) = nCrpx
(1 p)n x
(x = 1, 2, · · · , n)
p	
  =	
  0.7	
  
trial_size	
  =	
  10000	
  
sample_size	
  =	
  30	
  
set.seed(71)	
  
gen_binom_var	
  <-­‐	
  function()	
  {	
  
	
  	
  return(sum(rbern(sample_size,	
  p)))	
  
}	
  
result	
  <-­‐	
  rdply(trial_size,	
  gen_binom_var())	
  
dens	
  <-­‐	
  data.frame(y=dbinom(seq(sample_size),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sample_size,	
  0.7))*trial_size	
  
ggplot()	
  +	
  
	
  	
  layer(data=resuylt,	
  mapping=aes(x=V1),	
  geom="bar",	
  stat	
  =	
  "bin",	
  
	
  	
  binwidth=1,	
  fill="#6666ee",	
  color="gray"	
  
)	
  +	
  layer(data=dens,	
  mapping=aes(x=seq(sample_size)+.5,	
  y=y),	
  	
  
	
  	
  	
  	
  geom="line",	
  stat="identity",	
  position="identity",colour="red"	
  
	
  	
  )	
  +	
  ggtitle("Bernoulli	
  to	
  Binomial.")	
  
f(x) =
⇢
1 (0  x  1)
0 (otherwise)
Z = x1(1/2)1
+ x2(1/2)2
+ · · · + xq(1/2)q
width	
  <-­‐	
  0.02	
  
p	
  <-­‐	
  0.5;	
  
sample_size	
  <-­‐	
  1000	
  
trial_size	
  <-­‐	
  100000	
  
gen_unif_rand	
  <-­‐	
  function()	
  {	
  
	
  	
  return	
  (sum(rbern(sample_size,	
  p)	
  *	
  (rep(1/2,	
  sample_size)	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  **	
  seq(sample_size))))	
  
}	
  
gen_rand	
  <-­‐	
  function(){	
  	
  	
  
	
  	
  return(	
  rdply(trial_size,	
  gen_unif_rand())	
  )	
  
}	
  
system.time(res	
  <-­‐	
  gen_rand())	
  
ggplot()	
  +	
  
	
  	
  layer(data=res,	
  mapping=aes(x=V1),	
  geom="bar",	
  stat	
  =	
  "bin",	
  
	
  	
  	
  	
  	
  	
  	
  	
  binwidth=width,	
  fill="#6666ee",	
  color="gray"	
  
	
  	
  )	
  +	
  ggtitle("Bernoulli	
  to	
  Standard	
  Uniform")	
  
(0 < x < 1)
Xi ⇠ U(0, 1)iid
(i = 1, 2, · · · , ↵ + 1)
f(x, ↵, ) =
1
B(↵, )
x↵ 1
(1 x) 1
width	
  <-­‐	
  0.03;	
  p	
  <-­‐	
  0.5	
  
digits_length	
  <-­‐	
  30;	
  set_size	
  <-­‐	
  3	
  
trial_size	
  	
  	
  	
  <-­‐	
  30000	
  
gen_unif_rand	
  <-­‐	
  function()	
  {	
  
	
  	
  return	
  (sum(rbern(digits_length,	
  p)	
  *	
  	
  
	
  	
  (rep(1/2,	
  digits_length)	
  **	
  	
  
	
  	
  	
  seq(digits_length))))	
  
}	
  
gen_rand	
  <-­‐	
  function(){	
  	
  	
  
	
  	
  return(	
  rdply(set_size,	
  gen_unif_rand())$V1	
  )	
  
}	
  
unif_dataset	
  <-­‐	
  rlply(trial_size,	
  gen_rand,	
  .progress='text')	
  
p	
  <-­‐	
  ceiling(set_size	
  *	
  0.5);	
  q	
  <-­‐	
  set_size	
  -­‐	
  p	
  +	
  1	
  
get_nth_data	
  <-­‐	
  function(a){	
  return(a[order(a)][p])	
  }	
  
disp_data	
  <-­‐	
  data.frame(lapply(unif_dataset,	
  get_nth_data))	
  
names(disp_data)	
  <-­‐	
  seq(length(disp_data));	
  disp_data	
  <-­‐	
  data.frame(t(disp_data))	
  
names(disp_data)	
  <-­‐	
  "V1"	
  
x_range	
  <-­‐	
  seq(0,	
  1,	
  0.001)	
  
dens	
  <-­‐	
  data.frame(y=dbeta(x_range,	
  p,	
  q)*trial_size*width)	
  
ggplot()	
  +	
  
	
  	
  layer(data=disp_data,	
  mapping=aes(x=V1),	
  geom="bar",	
  stat	
  =	
  "bin",	
  
	
  	
  	
  	
  	
  	
  	
  	
  binwidth=width,	
  fill="#6666ee",	
  color="gray"	
  
	
  	
  )	
  +	
  layer(data=dens,	
  mapping=aes(x=x_range,	
  y=y),	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  geom="line",	
  stat="identity",	
  position="identity",	
  colour="red"	
  
	
  	
  )	
  +	
  ggtitle("Bernoulli	
  to	
  Beta")	
  
P(X = x) = px
(1 p)1 x
p, 1 p
p ⇠ Beta(↵, )
p, 1 p1 p
P
i
f(x = i|p) = pi
p = (p1, ..., pk)
kX
i=1
pi = 1
trial_num	
  =	
  10000	
  
x	
  =	
  rd.multinomial(1,	
  [1/6]*6,	
  trial_num)	
  
result	
  =	
  np.sum(x,	
  axis=0)	
  
data	
  =	
  np.array([result,	
  np.array([1/6]*6)*trial_num]).T	
  
#	
  Draw	
  graph	
  
df	
  =	
  pd.DataFrame(data,	
  columns=["trial","theory"],index=range(1,7))	
  
ax	
  =	
  df.plot.bar()	
  
ax.set_ylim(0,2000)	
  
ax.legend(loc='best')
P
P
ip = (p1, ..., pk)
n
結果の例
([[4, 1, 1, 5, 5, 2],
[3, 3, 2, 4, 3, 3],
[1, 4, 3, 4, 3, 3],
...,
[3, 3, 4, 2, 3, 3],
[3, 3, 2, 3, 4, 3],
[1, 3, 4, 3, 4, 3]])
f(x; p) =
(
n!
x1!···xk! px1
1 · · · pxk
k when
Pk
i=1 xi = n
0 otherwise.
P
P
↵ = (↵1, ↵2, · · · , ↵K)
f(p; ↵) =
1
B(↵)
KY
i=1
p↵i 1
i
pi 0,
X
pi = 1
z wθα
β φ
N D
:"Observed"variables
:"Unknown"parameters
:"Hyper"parameters
wordtopictopic"generate
distribu;on
word"generate
distribu;on
doc word freq
0 128 2
0 129 2
0 130 2
0 131 1
0 5 1
0 134 2
0 7 2
0 137 1
0 139 1
0 140 1
0 141 1
0 14 1
0 16 2
0 18 2
0 19 3
0 20 1
0 23 1
0 26 6
0 28 3
0 31 2
0 32 7
0 36 1
0 37 1
0 38 1
0 42 5
0 44 1
0 45 4
0 46 2
0 47 3
0 49 1
0 52 5
0 53 1
0 9 1
0 57 1
0 6 1
0 59 2
0 60 1
0 61 1
0 66 3
0 67 1
0 68 1
0 69 1
0 70 6
0 72 2
0 75 1
0 76 1
0 78 1
0 79 5
0 81 2
0 82 1
0 83 2
0 84 2
0 85 2
0 55 1
0 89 2
0 90 1
0 91 1
0 92 1
0 93 1
0 94 4
0 95 2
0 96 3
0 98 14
0 99 1
0 100 2
0 101 5
0 103 7
0 104 4
0 105 3
0 106 1
0 107 1
doc word freq
98 142 1
99 129 1
99 131 4
99 5 2
99 134 3
99 1 2
99 136 1
99 137 1
99 10 1
99 139 1
99 13 1
99 16 1
99 3 1
99 20 1
99 22 1
99 25 1
99 27 1
99 28 2
99 29 1
99 30 2
99 133 1
99 36 3
99 37 1
99 42 3
99 45 6
99 46 1
99 47 2
99 8 1
99 115 2
99 52 1
99 53 1
99 138 1
99 55 4
99 57 2
99 61 1
99 63 1
99 67 1
99 69 1
99 70 1
99 72 2
99 73 1
99 74 2
99 75 3
99 76 4
99 77 1
99 79 3
99 84 3
99 85 1
99 89 1
99 91 3
99 94 5
99 144 1
99 98 2
99 99 3
99 101 1
99 102 2
99 103 4
99 105 1
99 107 1
99 108 2
99 109 1
99 111 1
99 114 2
99 19 2
99 116 2
99 118 3
99 119 1
99 121 1
99 9 1
99 123 1
99 127 1
data	
  {	
  
	
  	
  	
  int<lower=2>	
  K;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  num	
  topics	
  
	
  	
  	
  int<lower=2>	
  V;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  num	
  words	
  
	
  	
  	
  int<lower=1>	
  M;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  num	
  docs	
  
	
  	
  	
  int<lower=1>	
  N;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  total	
  word	
  instances	
  
	
  	
  	
  int<lower=1,upper=V>	
  W[N];	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  word	
  n	
  
	
  	
  	
  int<lower=1>	
  Freq[N];	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  frequency	
  of	
  word	
  n	
  
	
  	
  	
  int<lower=1,upper=N>	
  Offset[M,2];	
  	
  #	
  range	
  of	
  word	
  index	
  per	
  doc	
  
	
  	
  	
  vector<lower=0>[K]	
  Alpha;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  topic	
  prior	
  
	
  	
  	
  vector<lower=0>[V]	
  Beta;	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  #	
  word	
  prior	
  
}	
  
parameters	
  {	
  
	
  	
  	
  simplex[K]	
  theta[M];	
  	
  	
  #	
  topic	
  dist	
  for	
  doc	
  m	
  
	
  	
  	
  simplex[V]	
  phi[K];	
  	
  	
  	
  	
  #	
  word	
  dist	
  for	
  topic	
  k	
  
}	
  
model	
  {	
  
	
  	
  	
  #	
  prior	
  
	
  	
  	
  for	
  (m	
  in	
  1:M)	
  
	
  	
  	
  	
  	
  	
  theta[m]	
  ~	
  dirichlet(Alpha);	
  
	
  	
  	
  for	
  (k	
  in	
  1:K)	
  
	
  	
  	
  	
  	
  	
  phi[k]	
  ~	
  dirichlet(Beta);	
  
	
  	
  	
  #	
  likelihood	
  
	
  	
  	
  for	
  (m	
  in	
  1:M)	
  {	
  
	
  	
  	
  	
  	
  	
  for	
  (n	
  in	
  Offset[m,1]:Offset[m,2])	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  real	
  gamma[K];	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  for	
  (k	
  in	
  1:K)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  gamma[k]	
  <-­‐	
  log(theta[m,k])	
  +	
  log(phi[k,W[n]]);	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  increment_log_prob(Freq[n]	
  *	
  log_sum_exp(gamma));	
  
	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  }	
  
}
✓
✓
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」

Weitere ähnliche Inhalte

Was ist angesagt?

ゲーム理論BASIC 第41回 -続・仁-
ゲーム理論BASIC 第41回 -続・仁-ゲーム理論BASIC 第41回 -続・仁-
ゲーム理論BASIC 第41回 -続・仁-ssusere0a682
 
ゲーム理論BASIC 演習6 -仁を求める-
ゲーム理論BASIC 演習6 -仁を求める-ゲーム理論BASIC 演習6 -仁を求める-
ゲーム理論BASIC 演習6 -仁を求める-ssusere0a682
 
Hiroyuki Sato
Hiroyuki SatoHiroyuki Sato
Hiroyuki SatoSuurist
 
Hiroaki Shiokawa
Hiroaki ShiokawaHiroaki Shiokawa
Hiroaki ShiokawaSuurist
 
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-ssusere0a682
 
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-ssusere0a682
 
solucionario de purcell 2
solucionario de purcell 2solucionario de purcell 2
solucionario de purcell 2José Encalada
 
solucionario de purcell 0
solucionario de purcell 0solucionario de purcell 0
solucionario de purcell 0José Encalada
 
solucionario de purcell 1
solucionario de purcell 1solucionario de purcell 1
solucionario de purcell 1José Encalada
 
Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximationTarun Gehlot
 
Hand book of Howard Anton calculus exercises 8th edition
Hand book of Howard Anton calculus exercises 8th editionHand book of Howard Anton calculus exercises 8th edition
Hand book of Howard Anton calculus exercises 8th editionPriSim
 
51554 0131469657 ism-13
51554 0131469657 ism-1351554 0131469657 ism-13
51554 0131469657 ism-13Carlos Fuentes
 
Regression_Sample
Regression_SampleRegression_Sample
Regression_SampleJie Huang
 
51549 0131469657 ism-8
51549 0131469657 ism-851549 0131469657 ism-8
51549 0131469657 ism-8Carlos Fuentes
 
51556 0131469657 ism-15
51556 0131469657 ism-1551556 0131469657 ism-15
51556 0131469657 ism-15Carlos Fuentes
 

Was ist angesagt? (19)

ゲーム理論BASIC 第41回 -続・仁-
ゲーム理論BASIC 第41回 -続・仁-ゲーム理論BASIC 第41回 -続・仁-
ゲーム理論BASIC 第41回 -続・仁-
 
ゲーム理論BASIC 演習6 -仁を求める-
ゲーム理論BASIC 演習6 -仁を求める-ゲーム理論BASIC 演習6 -仁を求める-
ゲーム理論BASIC 演習6 -仁を求める-
 
Hiroyuki Sato
Hiroyuki SatoHiroyuki Sato
Hiroyuki Sato
 
Hiroaki Shiokawa
Hiroaki ShiokawaHiroaki Shiokawa
Hiroaki Shiokawa
 
SOAL RANGKAIAN LOGIKA
SOAL RANGKAIAN LOGIKASOAL RANGKAIAN LOGIKA
SOAL RANGKAIAN LOGIKA
 
B010310813
B010310813B010310813
B010310813
 
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-
ゲーム理論BASIC 演習32 -時間決めゲーム:交渉ゲーム-
 
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-
【演習】Re:ゲーム理論入門 第11回 -非協力ゲームにおける交渉ゲーム-
 
solucionario de purcell 2
solucionario de purcell 2solucionario de purcell 2
solucionario de purcell 2
 
solucionario de purcell 0
solucionario de purcell 0solucionario de purcell 0
solucionario de purcell 0
 
solucionario de purcell 1
solucionario de purcell 1solucionario de purcell 1
solucionario de purcell 1
 
Local linear approximation
Local linear approximationLocal linear approximation
Local linear approximation
 
Hand book of Howard Anton calculus exercises 8th edition
Hand book of Howard Anton calculus exercises 8th editionHand book of Howard Anton calculus exercises 8th edition
Hand book of Howard Anton calculus exercises 8th edition
 
51554 0131469657 ism-13
51554 0131469657 ism-1351554 0131469657 ism-13
51554 0131469657 ism-13
 
Regression_Sample
Regression_SampleRegression_Sample
Regression_Sample
 
51549 0131469657 ism-8
51549 0131469657 ism-851549 0131469657 ism-8
51549 0131469657 ism-8
 
51556 0131469657 ism-15
51556 0131469657 ism-1551556 0131469657 ism-15
51556 0131469657 ism-15
 
Derivadas
DerivadasDerivadas
Derivadas
 
Chain rule
Chain ruleChain rule
Chain rule
 

Ähnlich wie 第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」

Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Dr. Volkan OBAN
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015ihji
 
The Ring programming language version 1.10 book - Part 81 of 212
The Ring programming language version 1.10 book - Part 81 of 212The Ring programming language version 1.10 book - Part 81 of 212
The Ring programming language version 1.10 book - Part 81 of 212Mahmoud Samir Fayed
 
Frsa
FrsaFrsa
Frsa_111
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1Ke Wei Louis
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)theijes
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docxfaithxdunce63732
 
[DL輪読会]Conditional Neural Processes
[DL輪読会]Conditional Neural Processes[DL輪読会]Conditional Neural Processes
[DL輪読会]Conditional Neural ProcessesDeep Learning JP
 
Conditional neural processes
Conditional neural processesConditional neural processes
Conditional neural processesKazuki Fujikawa
 
Time Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal RecoveryTime Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal RecoveryDaniel Cuneo
 
The Ring programming language version 1.9 book - Part 69 of 210
The Ring programming language version 1.9 book - Part 69 of 210The Ring programming language version 1.9 book - Part 69 of 210
The Ring programming language version 1.9 book - Part 69 of 210Mahmoud Samir Fayed
 
A/B Testing for Game Design
A/B Testing for Game DesignA/B Testing for Game Design
A/B Testing for Game DesignTrieu Nguyen
 

Ähnlich wie 第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」 (20)

Prelude to halide_public
Prelude to halide_publicPrelude to halide_public
Prelude to halide_public
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
R intro 20140716-advance
R intro 20140716-advanceR intro 20140716-advance
R intro 20140716-advance
 
The Ring programming language version 1.10 book - Part 81 of 212
The Ring programming language version 1.10 book - Part 81 of 212The Ring programming language version 1.10 book - Part 81 of 212
The Ring programming language version 1.10 book - Part 81 of 212
 
C programs
C programsC programs
C programs
 
Frsa
FrsaFrsa
Frsa
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 
The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)The International Journal of Engineering and Science (IJES)
The International Journal of Engineering and Science (IJES)
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
Nbvtalkatbzaonencryptionpuzzles
NbvtalkatbzaonencryptionpuzzlesNbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
 
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
Current Score  –  0 Due  Wednesday, November 19 2014 0400 .docxCurrent Score  –  0 Due  Wednesday, November 19 2014 0400 .docx
Current Score – 0 Due Wednesday, November 19 2014 0400 .docx
 
[DL輪読会]Conditional Neural Processes
[DL輪読会]Conditional Neural Processes[DL輪読会]Conditional Neural Processes
[DL輪読会]Conditional Neural Processes
 
Conditional neural processes
Conditional neural processesConditional neural processes
Conditional neural processes
 
kactl.pdf
kactl.pdfkactl.pdf
kactl.pdf
 
Time Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal RecoveryTime Series Analysis:Basic Stochastic Signal Recovery
Time Series Analysis:Basic Stochastic Signal Recovery
 
The Ring programming language version 1.9 book - Part 69 of 210
The Ring programming language version 1.9 book - Part 69 of 210The Ring programming language version 1.9 book - Part 69 of 210
The Ring programming language version 1.9 book - Part 69 of 210
 
A/B Testing for Game Design
A/B Testing for Game DesignA/B Testing for Game Design
A/B Testing for Game Design
 
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
 

Mehr von Ken'ichi Matsui

ベータ分布の謎に迫る
ベータ分布の謎に迫るベータ分布の謎に迫る
ベータ分布の謎に迫るKen'ichi Matsui
 
音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみるKen'ichi Matsui
 
データサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストデータサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストKen'ichi Matsui
 
分析コンペティションの光と影
分析コンペティションの光と影分析コンペティションの光と影
分析コンペティションの光と影Ken'ichi Matsui
 
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKen'ichi Matsui
 
データ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたデータ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたKen'ichi Matsui
 
確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみるKen'ichi Matsui
 
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点Ken'ichi Matsui
 
Variational Autoencoderの紹介
Variational Autoencoderの紹介Variational Autoencoderの紹介
Variational Autoencoderの紹介Ken'ichi Matsui
 
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」Ken'ichi Matsui
 
15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学Ken'ichi Matsui
 
Random Forest による分類
Random Forest による分類Random Forest による分類
Random Forest による分類Ken'ichi Matsui
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法Ken'ichi Matsui
 
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料Ken'ichi Matsui
 
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 Ken'ichi Matsui
 
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理Ken'ichi Matsui
 
白い陽気なやつとPythonでたわむれる
白い陽気なやつとPythonでたわむれる白い陽気なやつとPythonでたわむれる
白い陽気なやつとPythonでたわむれるKen'ichi Matsui
 
異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知Ken'ichi Matsui
 

Mehr von Ken'ichi Matsui (20)

ベータ分布の謎に迫る
ベータ分布の謎に迫るベータ分布の謎に迫る
ベータ分布の謎に迫る
 
音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる
 
データサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストデータサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテスト
 
分析コンペティションの光と影
分析コンペティションの光と影分析コンペティションの光と影
分析コンペティションの光と影
 
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
 
BERT入門
BERT入門BERT入門
BERT入門
 
データ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたデータ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかた
 
確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる
 
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
 
Introduction of VAE
Introduction of VAEIntroduction of VAE
Introduction of VAE
 
Variational Autoencoderの紹介
Variational Autoencoderの紹介Variational Autoencoderの紹介
Variational Autoencoderの紹介
 
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
 
15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学
 
Random Forest による分類
Random Forest による分類Random Forest による分類
Random Forest による分類
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
 
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
 
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
 
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理
基礎からのベイズ統計学 輪読会資料 第1章 確率に関するベイズの定理
 
白い陽気なやつとPythonでたわむれる
白い陽気なやつとPythonでたわむれる白い陽気なやつとPythonでたわむれる
白い陽気なやつとPythonでたわむれる
 
異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知
 

Kürzlich hochgeladen

From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfBoston Institute of Analytics
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.pptamreenkhanum0307
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxBoston Institute of Analytics
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 

Kürzlich hochgeladen (20)

From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdfPredicting Salary Using Data Science: A Comprehensive Analysis.pdf
Predicting Salary Using Data Science: A Comprehensive Analysis.pdf
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.ppt
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptxNLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
NLP Project PPT: Flipkart Product Reviews through NLP Data Science.pptx
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 

第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」

  • 2.
  • 4.
  • 7. x1, x2, · · · , xn xn+1
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. M xj+1 := axj + c mod M a = 1103515245, c = 12345, M = 231 231
  • 13. xj+1 := axj + c mod M 231 Ma = 1103515245, c = 12345, M = 231
  • 14. 219937 1 xk+n := xk+m (xk u | xk+1 l )A k = 0, 1, . . . 219937 1
  • 15. xk+n := xk+m (xk u | xk+1 l )A k = 0, 1, . . . A = ✓ 0 Iw 1 aw 1 (aw 2, . . . , a0) ◆ w = 0 B B B B B B B B B @ 0 1 · · · 0 ... 0 ... ... ... ... 0 0 · · · 1 aw 1 aw 2 · · · a0 1 C C C C C C C C C A 1  m < n 0  r  w 1 xA = ( shiftright(x) shiftright(x) + a xi = (xi(w 1), xi(w 2), · · · , xi(0)) xi(j) 2 {0, 1}
  • 16. y := x ((x >> u)&d) y := y ((y << s)&b) y := y ((y << t)&c) z := y (y >> l) x
  • 17. y := x ((x >> u)&d) y := y ((y << s)&b) y := y ((y << t)&c) z := y (y >> l) (w, n, m, r) = (32, 624, 397, 31) a = 9908B0DF16 (u, d) = (11, FFFFFFFF16) (s, b) = (7, 9D2C568016) (t, c) = (15, EFC6000016) l = 18 xk+n := xk+m (xk u | xk+1 l )A k = 0, 1, . . . A = ✓ 0 Iw 1 aw 1 (aw 2, . . . , a0) ◆ w = 32, n = 624, m = 397, r = 3 nw r = 19937 2nw r 1 219937 1 w = 32, n = 624, m = 397, r = 31
  • 18. y := x ((x >> u)&d) y := y ((y << s)&b) y := y ((y << t)&c) z := y (y >> l) (w, n, m, r) = (32, 624, 397, 31) a = 9908B0DF16 (u, d) = (11, FFFFFFFF16) (s, b) = (7, 9D2C568016) (t, c) = (15, EFC6000016) l = 18 xk+n := xk+m (xk u | xk+1 l )A k = 0, 1, . . . A = ✓ 0 Iw 1 aw 1 (aw 2, . . . , a0) ◆ w = 32, n = 624, m = 397, r = 3 nw r = 19937 2nw r 1 219937 1 w = 32, n = 624, m = 397, r = 31
  • 19.
  • 20.
  • 21.
  • 22. x = 1 x = 0 f(x; p) = 8 < : p if x = 1, 1 p if x = 0. f(x; p) = px (1 p)1 x , x = {0, 1} x p p 1 p
  • 23.
  • 24.
  • 25.
  • 27.
  • 28.
  • 29. P(X = x) = px (1 p)1 x (x = 0, 1)
  • 30.
  • 31. p  =  0.7   trial_size  =  10000   set.seed(71)   data  <-­‐  rbern(trial_size,  p)   dens  <-­‐  data.frame(y=c((1-­‐p),p)*trial_size,  x=c(0,  1))   ggplot()  +          layer(data=data.frame(x=data),  mapping=aes(x=x),  geom="bar",                      stat="bin",  bandwidth=0.1   )  +  layer(data=dens,  mapping=aes(x=x,  y=y),  geom="bar",                      stat="identity",  width=0.05,  fill="#777799",  alpha=0.7)  
  • 32.
  • 33. P(X = x) = nCrpx (1 p)n x (x = 1, 2, · · · , n)
  • 34.
  • 35. p  =  0.7   trial_size  =  10000   sample_size  =  30   set.seed(71)   gen_binom_var  <-­‐  function()  {      return(sum(rbern(sample_size,  p)))   }   result  <-­‐  rdply(trial_size,  gen_binom_var())   dens  <-­‐  data.frame(y=dbinom(seq(sample_size),                                          sample_size,  0.7))*trial_size   ggplot()  +      layer(data=resuylt,  mapping=aes(x=V1),  geom="bar",  stat  =  "bin",      binwidth=1,  fill="#6666ee",  color="gray"   )  +  layer(data=dens,  mapping=aes(x=seq(sample_size)+.5,  y=y),            geom="line",  stat="identity",  position="identity",colour="red"      )  +  ggtitle("Bernoulli  to  Binomial.")  
  • 36.
  • 37. f(x) = ⇢ 1 (0  x  1) 0 (otherwise)
  • 38. Z = x1(1/2)1 + x2(1/2)2 + · · · + xq(1/2)q
  • 39. width  <-­‐  0.02   p  <-­‐  0.5;   sample_size  <-­‐  1000   trial_size  <-­‐  100000   gen_unif_rand  <-­‐  function()  {      return  (sum(rbern(sample_size,  p)  *  (rep(1/2,  sample_size)                        **  seq(sample_size))))   }   gen_rand  <-­‐  function(){          return(  rdply(trial_size,  gen_unif_rand())  )   }   system.time(res  <-­‐  gen_rand())   ggplot()  +      layer(data=res,  mapping=aes(x=V1),  geom="bar",  stat  =  "bin",                  binwidth=width,  fill="#6666ee",  color="gray"      )  +  ggtitle("Bernoulli  to  Standard  Uniform")  
  • 40.
  • 41. (0 < x < 1) Xi ⇠ U(0, 1)iid (i = 1, 2, · · · , ↵ + 1) f(x, ↵, ) = 1 B(↵, ) x↵ 1 (1 x) 1
  • 42.
  • 43. width  <-­‐  0.03;  p  <-­‐  0.5   digits_length  <-­‐  30;  set_size  <-­‐  3   trial_size        <-­‐  30000   gen_unif_rand  <-­‐  function()  {      return  (sum(rbern(digits_length,  p)  *        (rep(1/2,  digits_length)  **          seq(digits_length))))   }   gen_rand  <-­‐  function(){          return(  rdply(set_size,  gen_unif_rand())$V1  )   }   unif_dataset  <-­‐  rlply(trial_size,  gen_rand,  .progress='text')   p  <-­‐  ceiling(set_size  *  0.5);  q  <-­‐  set_size  -­‐  p  +  1   get_nth_data  <-­‐  function(a){  return(a[order(a)][p])  }   disp_data  <-­‐  data.frame(lapply(unif_dataset,  get_nth_data))   names(disp_data)  <-­‐  seq(length(disp_data));  disp_data  <-­‐  data.frame(t(disp_data))   names(disp_data)  <-­‐  "V1"   x_range  <-­‐  seq(0,  1,  0.001)   dens  <-­‐  data.frame(y=dbeta(x_range,  p,  q)*trial_size*width)   ggplot()  +      layer(data=disp_data,  mapping=aes(x=V1),  geom="bar",  stat  =  "bin",                  binwidth=width,  fill="#6666ee",  color="gray"      )  +  layer(data=dens,  mapping=aes(x=x_range,  y=y),                            geom="line",  stat="identity",  position="identity",  colour="red"      )  +  ggtitle("Bernoulli  to  Beta")  
  • 44.
  • 45. P(X = x) = px (1 p)1 x p, 1 p p ⇠ Beta(↵, ) p, 1 p1 p
  • 46. P
  • 47. i f(x = i|p) = pi p = (p1, ..., pk) kX i=1 pi = 1
  • 48. trial_num  =  10000   x  =  rd.multinomial(1,  [1/6]*6,  trial_num)   result  =  np.sum(x,  axis=0)   data  =  np.array([result,  np.array([1/6]*6)*trial_num]).T   #  Draw  graph   df  =  pd.DataFrame(data,  columns=["trial","theory"],index=range(1,7))   ax  =  df.plot.bar()   ax.set_ylim(0,2000)   ax.legend(loc='best')
  • 49. P P
  • 50. ip = (p1, ..., pk) n 結果の例 ([[4, 1, 1, 5, 5, 2], [3, 3, 2, 4, 3, 3], [1, 4, 3, 4, 3, 3], ..., [3, 3, 4, 2, 3, 3], [3, 3, 2, 3, 4, 3], [1, 3, 4, 3, 4, 3]]) f(x; p) = ( n! x1!···xk! px1 1 · · · pxk k when Pk i=1 xi = n 0 otherwise.
  • 51. P P
  • 52. ↵ = (↵1, ↵2, · · · , ↵K) f(p; ↵) = 1 B(↵) KY i=1 p↵i 1 i pi 0, X pi = 1
  • 53.
  • 54.
  • 55.
  • 56. z wθα β φ N D :"Observed"variables :"Unknown"parameters :"Hyper"parameters wordtopictopic"generate distribu;on word"generate distribu;on
  • 57. doc word freq 0 128 2 0 129 2 0 130 2 0 131 1 0 5 1 0 134 2 0 7 2 0 137 1 0 139 1 0 140 1 0 141 1 0 14 1 0 16 2 0 18 2 0 19 3 0 20 1 0 23 1 0 26 6 0 28 3 0 31 2 0 32 7 0 36 1 0 37 1 0 38 1 0 42 5 0 44 1 0 45 4 0 46 2 0 47 3 0 49 1 0 52 5 0 53 1 0 9 1 0 57 1 0 6 1 0 59 2 0 60 1 0 61 1 0 66 3 0 67 1 0 68 1 0 69 1 0 70 6 0 72 2 0 75 1 0 76 1 0 78 1 0 79 5 0 81 2 0 82 1 0 83 2 0 84 2 0 85 2 0 55 1 0 89 2 0 90 1 0 91 1 0 92 1 0 93 1 0 94 4 0 95 2 0 96 3 0 98 14 0 99 1 0 100 2 0 101 5 0 103 7 0 104 4 0 105 3 0 106 1 0 107 1 doc word freq 98 142 1 99 129 1 99 131 4 99 5 2 99 134 3 99 1 2 99 136 1 99 137 1 99 10 1 99 139 1 99 13 1 99 16 1 99 3 1 99 20 1 99 22 1 99 25 1 99 27 1 99 28 2 99 29 1 99 30 2 99 133 1 99 36 3 99 37 1 99 42 3 99 45 6 99 46 1 99 47 2 99 8 1 99 115 2 99 52 1 99 53 1 99 138 1 99 55 4 99 57 2 99 61 1 99 63 1 99 67 1 99 69 1 99 70 1 99 72 2 99 73 1 99 74 2 99 75 3 99 76 4 99 77 1 99 79 3 99 84 3 99 85 1 99 89 1 99 91 3 99 94 5 99 144 1 99 98 2 99 99 3 99 101 1 99 102 2 99 103 4 99 105 1 99 107 1 99 108 2 99 109 1 99 111 1 99 114 2 99 19 2 99 116 2 99 118 3 99 119 1 99 121 1 99 9 1 99 123 1 99 127 1
  • 58. data  {        int<lower=2>  K;                                        #  num  topics        int<lower=2>  V;                                        #  num  words        int<lower=1>  M;                                        #  num  docs        int<lower=1>  N;                                        #  total  word  instances        int<lower=1,upper=V>  W[N];                  #  word  n        int<lower=1>  Freq[N];                            #  frequency  of  word  n        int<lower=1,upper=N>  Offset[M,2];    #  range  of  word  index  per  doc        vector<lower=0>[K]  Alpha;                    #  topic  prior        vector<lower=0>[V]  Beta;                      #  word  prior   }   parameters  {        simplex[K]  theta[M];      #  topic  dist  for  doc  m        simplex[V]  phi[K];          #  word  dist  for  topic  k   }   model  {        #  prior        for  (m  in  1:M)              theta[m]  ~  dirichlet(Alpha);        for  (k  in  1:K)              phi[k]  ~  dirichlet(Beta);        #  likelihood        for  (m  in  1:M)  {              for  (n  in  Offset[m,1]:Offset[m,2])  {                    real  gamma[K];                    for  (k  in  1:K)                          gamma[k]  <-­‐  log(theta[m,k])  +  log(phi[k,W[n]]);                    increment_log_prob(Freq[n]  *  log_sum_exp(gamma));              }        }   }
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.