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
79 stars 28 forks source link

Create deep copy of input model to avoid overwriting input #28

Closed melhemr closed 1 year ago

melhemr commented 1 year ago

This PR creates a deep copy of the input model used in out-of-sample harmonization. Creating a deep copy avoids the problem of overwriting the existing model during the process of out-of-sample harmonization.

AbdulkadirA commented 1 year ago

@melhemr I tested the PR and it behaves as expected, i.e. repeated calls to neuroharmonizeLearn() are possible without an error.

melhemr commented 1 year ago

@rpomponio merge whenever you approve