From 1c3fd3d8af3dfc2d27dd7242a125d5eb48e763e9 Mon Sep 17 00:00:00 2001 From: stnava Date: Sun, 21 Jan 2024 19:42:41 -0500 Subject: [PATCH] BUG: forgot standardize True --- ants/utils/quantile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ants/utils/quantile.py b/ants/utils/quantile.py index 615ee36e..c4fc3e90 100644 --- a/ants/utils/quantile.py +++ b/ants/utils/quantile.py @@ -340,7 +340,7 @@ def butter_bandpass_filter(data, lowcut, highcut, fs, order ): matrix[:,k], lowf, highf, fs, order=order ) return matrixOut -def clean_data(arr, standardize=False): +def clean_data(arr, standardize=True): """ Remove columns from a NumPy array that have no variation or contain NA/Inf values. Optionally standardize the remaining data. @@ -432,7 +432,7 @@ def compute_tSTD(M, quantile, x=0, axis=0): # M = M / compute_tSTD(M, 1.)['tSTD'] # "The covariance matrix C = MMT was constructed and decomposed into its # principal components using a singular value decomposition." - M = clean_data( M ) + M = clean_data( M, standardize=True ) u, _, _ = linalg.svd(M, full_matrices=False) if components is None: components = u[:, :ncompcor]