FactorSVResult.loadings#
- property FactorSVResult.loadings: NDArray[float64][source]#
Posterior-mean loading matrix,
(k, r).Lower triangular with a unit diagonal in the leading
rrows by construction; those cells have no posterior spread.Example
>>> import numpy as np >>> rng = np.random.default_rng(1) >>> factors = rng.standard_normal((250, 2)) >>> lam = np.array([[1.0, 0.0], [0.5, 1.0], [0.7, -0.3], [0.2, 0.6]]) >>> y = factors @ lam.T + 0.4 * rng.standard_normal((250, 4)) >>> res = FactorSV(y, n_factors=2).fit(n_draws=200, n_burn=50, seed=0) >>> res.loadings[0], res.loadings[1, 1] (array([1., 0.]), np.float64(1.0)) >>> bool(np.max(np.abs(res.loadings - lam)) < 0.15) True