mehta-lab / microDL

3D virtual staining with 2D and 2.5D U-Nets
BSD 3-Clause "New" or "Revised" License
27 stars 7 forks source link

z-score #204

Closed yingmuzhi closed 1 year ago

yingmuzhi commented 1 year ago

Hi,there.In the script normalize.py, zscore, use median and interquartile range to replace mean and standard deviation.why? what is the difference between using median or mean. It is very nice of you to help me out this Question, thanks:)

Christianfoley commented 1 year ago

Hi @yingmuzhi. We have noticed that for some of our data, using median and IQR over mean and STD helps to preserve information about the dynamic range of our samples and generate the most accurate intensity prediction (see section Data preprocessing for model training in "Revealing architectural order with quantitative label-free imaging and deep learning").

While this has worked for our data in the past, the normalization scheme is by all means a hyperparameter, and can be tuned to the distribution that best fits your data.