2

numpy マニュアルでは、次のように述べられています。

Instead of specifying the full covariance matrix, popular approximations include:  
    Spherical covariance (cov is a multiple of the identity matrix)

誰かが球面共分散を指定したことがありますか? メモリを大量に消費する完全な共分散行列を作成しないように機能させようとしています。

4

2 に答える 2

1

対角共分散行列だけがある場合は、通常、 を使用する代わりに、標準の正規変量を自分でスケーリングする方が簡単 (かつ効率的)multivariate_normal()です。

>>> import numpy as np
>>> stdevs = np.array([3.0, 4.0, 5.0])
>>> x = np.random.standard_normal([100, 3])
>>> x.shape
(100, 3)
>>> x *= stdevs
>>> x.std(axis=0)
array([ 3.23973255,  3.40988788,  4.4843039 ])
于 2013-05-16T09:31:58.840 に答える