def diag_whiten(datalist): mu, l = mean(datalist), np.sqrt(diag_of_cov(datalist)) def apply_whitening(x): return (x - mu) / l + mu return general.treemap(apply_whitening, datalist)
def whiten(datalist): mu, L = mean(datalist), np.linalg.cholesky(cov(datalist)) def apply_whitening(x): return np.linalg.solve(L, (x - mu).T).T + mu return general.treemap(apply_whitening, datalist)
def whiten(datalist): mu, L = mean(datalist), np.linalg.cholesky(cov(datalist)) def apply_whitening(x): return np.linalg.solve(L, (x-mu).T).T + mu return general.treemap(apply_whitening, datalist)
def diag_whiten(datalist): mu, l = mean(datalist), np.sqrt(diag_of_cov(datalist)) def apply_whitening(x): return (x-mu)/l + mu return general.treemap(apply_whitening, datalist)