Jfortin1 / ComBatHarmonization

Harmonization of multi-site imaging data with ComBat
268 stars 107 forks source link

train/test matlab implementation #23

Open neurominer-git opened 4 years ago

neurominer-git commented 4 years ago

Hi Jean-Philippe,

I'm trying to workout how to use combat in a train/test situation because it's super important to us and we want to use your implementation in our studies.

It seems that this could be pretty easily done by: 1) for training sample, output the stand_mean, var_pooled, gamma_star, delta_star. 2) for test sample, get the s_data using the training stand_mean/var_pooled and forward to the adjustment using the gamma_star/delta_star 3) for n_batch, use the training data n_batch and establish a dummy matrix for the test data with zeros if they do not contain a specific n_batch (i.e., if the test sample does not have any cases from a specific MRI site.

Is this on the right track? Is it possible to review the code if I do this? I talked with Russel Shinohara about it before a few times but haven't implemented it. My name is Dom Dwyer and I'm from LMU in Germany.

Thanks!

Best, Dom

neurominer-git commented 4 years ago

Hi Jean-Philippe, I coded the training-test combat (attached). Would be great if you had the time to check it. Just so you know... a colleague transferred an old version of a python script that had external validation functionality that seemed to come from this repo, but this was incorrect as it did not use the training mean and variance. I've sent a separate email to Taki.
Best, Dom

combat_extval.zip

Jfortin1 commented 4 years ago

Hi Dom,

Thanks for working on this! I just saw the email exchange with Taki. I'd be happy to go over the code and start implementing the test/training functionalities in our functions.

Re. the python module: I'm not sure where this comes from; we've never implemented a test/training strategy in this repo or elsewhere; this probably came from a different group.

Tibetan-eagle commented 3 years ago

Hi Jean-Philippe, I coded the training-test combat (attached). Would be great if you had the time to check it. Just so you know... a colleague transferred an old version of a python script that had external validation functionality that seemed to come from this repo, but this was incorrect as it did not use the training mean and variance. I've sent a separate email to Taki. Best, Dom

combat_extval.zip

Hi Dom,

I would like to hear an update on the code that you have written in matlab, do you know if this code has been reviewed by the ComBat authors? I am keen to try this on my dataset.

best Tenzin

neurominer-git commented 3 years ago

Hi Tenzin, I don’t know sorry. We used it for a paper in Cerebral Cortex though. Seems fine.

Best, Dom

From: Tibetan-eagle @.> Reply-To: Jfortin1/ComBatHarmonization @.> Date: Monday, 11 October 2021 at 7:24 pm To: Jfortin1/ComBatHarmonization @.> Cc: neurominer-git @.>, Author @.***> Subject: Re: [Jfortin1/ComBatHarmonization] train/test matlab implementation (#23)

Hi Jean-Philippe, I coded the training-test combat (attached). Would be great if you had the time to check it. Just so you know... a colleague transferred an old version of a python script that had external validation functionality that seemed to come from this repo, but this was incorrect as it did not use the training mean and variance. I've sent a separate email to Taki. Best, Dom

combat_extval.zip

Hi Dom,

I would like to hear an update on the code that you have written in matlab, do you know if this code has been reviewed by the ComBat authors? I am keen to try this on my dataset.

best Tenzin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.