WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RF: Simplify high-pass filtering in algorithms.confounds
Legendre and cosine detrending are implemented almost identically,
although with several minor variations. Here I separate regressor
creation from detrending to unify the implementations.
This now uses `np.linalg.pinv(X)` to estimate the betas in both cases,
rather than using `np.linalg.lstsq` in the cosine filter. lstsq uses SVD
and can thus fail to converge in rare cases. Under no circumstances
should (X.T @ X) be singular, so the pseudoinverse is unique and
precisely what we want.
0 commit comments