78c6747ff4fc,009
http://nhiro.org.s3.amazonaws.com/3/3/332a0e91dd84fae8debb6399cf71f038.jpg https://gyazo.com/332a0e91dd84fae8debb6399cf71f038
(OCR text)
2次元ガウス分布の負の対数尤度
def nll2d (args, group):
(mul, mu2, sig11, sig12, sig22)
det np.linalg.det (Sigma )
if det 0.0: return np.inf
invSigma
ret=
args
np. linalg.inv (Sigma)
np.log(det) len (group) 2
for y in group:
diff y
ret np.dot (np. dot (diff. transpose (), invSigma), diff) 2
if np.isnan (ret): return np.inf
return ret
毎回データを紙めるなんて遅そう?