Hi. I am developing a machine learning model to predict the diagnosis of a subject using his MRI data preprocessed using Voxel-based Morphometry. So, I have two groups of subjects (patients and control), and each person has a 3D volume with 128x128x128 voxels in MNI152 space.
The problem is that the groups have significantly different proportions of gender (verified using Chi-square proportion test). In another type of data, I would "regress out" (using a linear detrending algorithm) the effect of the non-imaging variable. However, I am not sure if this would make sense in this kind of data.
Is it make sense "regress out" the gender (or age and head size) from the intensity value of the voxel? What would be the best way to address the confounding effect of these non-imaging variables?
PS: I am using a deep neural network as the classifier.