rpomponio / neuroHarmonize

Harmonization tools for multi-site neuroimaging analysis. Implemented as a python package. Harmonization of MRI, sMRI, dMRI, fMRI variables with support for NIFTI images. Complements the work in Neuroimage by Pomponio et al. (2019).
https://pypi.org/project/neuroHarmonize/
MIT License
82 stars 28 forks source link

longitudinal data #33

Closed meganhuibregtse closed 9 months ago

meganhuibregtse commented 1 year ago

Hi Raymond--just had a quick question to make sure I understand you correctly. I am working with a longitudinal data set (5 sites, two time points). As per your documentation, "This feature allows you to train a harmonization model on a subset of data, then apply the model to the entire set. For example, in longitudinal analyses, one may wish to train a harmonization model on baseline cases and apply the model to follow-up cases, to avoid double-counting subjects."

Should I train the model on my first time point and then apply to the entire dataset (as per the first sentence) or train on the first time point and then apply separately to the second time point (the second sentence)?

rpomponio commented 9 months ago

Should I train the model on my first time point and then apply to the entire dataset...

Yes, you should train your harmonization model with data from the first time point only. You can apply the model to data from subsequent time points, as long as those sites are identical to the sites in the training dataset.

Once the model is trained, you should have a copy of the data from the first time point, now harmonized. You may choose to disregard this copy and apply the model to the entire dataset, or you can keep this copy and apply the model to data from the second time point. It doesn't really matter.