-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_coeffs run on mean-centered data for no reason #179
Comments
Just to follow this up, the demeaning of |
I don't see any reason why the above couldn't be done. Can you point me to the blob where'd like someone to see why de-meaning messes up the beta values? |
I have been working on the get_coeffs and computefeats2 functions (i.e. stats.py), which were basically performing a ordinary least squares (OLS) estimation and computation of Z-values after Fisher transformation assuming that OLS estimates were correlation coefficients, which is not exactly the same. Two related points:
In such manner, get_coeffs would be a simple OLS estimation and computation of Z-values. And these changes will also affect to the following pull request #458 (comment) |
Thanks @CesarCaballeroGaudes -- does this mean that you'll be adding these changes into that PR ? It'd be great if we could keep the PRs focused, if at all possible. So, please keep us up to date with what you're intending to change ! I think that can be separate from the improvements to the documentation (which are also very much needed !). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to tedana:tada: ! |
The function
get_coeffs
performs a least-squares fit of parameterX
(generally a mixing matrix) on parameterdata
(generally optcom or other data). It is used in the following locations:data
is not demeaned.add_const
is not provided, so it defaults to False.X
is ICA mixing matrix anddata
is demeaned data.add_const
is not provided, so it defaults to False.X
is ICA mixing matrix anddata
is demeaned data.add_const
is not provided, so it defaults to False.X
is ICA or PCA mixing matrix anddata
is demeaned optimally combined data.add_const
is not provided, so it defaults to False.X
is ICA or PCA mixing matrix anddata
is concatenated data (catd
; not demeaned, afaik).add_const
is not provided, so it defaults to False.X
is ICA or PCA mixing matrix anddata
is demeaned.add_const
is not provided, so it defaults to False.As far as I can tell,
add_const
isn't used anywhere in the package. That said, I also realized that demeaningdata
along axis 1 (which is how it is done when it is done) does not affect the results, so I'm not sure why we do it.A really weird behavior that I don't understand at all is, when Y is not mean-centered, X gives the correct beta (with no need for an intercept) if X is mean-centered, but not if it's not. Does anyone know why that is?
Still, regardless of why that's the case, I think that we just need to mean-center X in
get_coeffs
, and we can stop mean-centeringdata
and can also drop theadd_const
argument (should be unnecessary as long as X is mean-centered and it's never used anyway). This should not affect the results, but will make the code much easier to understand. How does that sound?The text was updated successfully, but these errors were encountered: