<p>There is, beside of numerical <em>losses</em> not difference between directly using z-normalization and first min-max and then z-normalization.</p>
<h5>Explanation</h5>
<p>Both are affine transformations and a combination of affine transformations is again an affine transformation. Since there is only one(*) affine transformation that results on zero-mean and variance of one, the z-normalization will (kind of) undo all previous affine transformations to achieve this goal.</p>
<p>(*): In fact there are two and you could get the other by multiplying every value with -1. But this is just a silly detail and does not matter for this question.</p>

CC BY-SA 4.0
2023-06-26T21:58:00.300Z
2023-06-26T21:58:00.300Z
Broele
<p>I want to implement a neural network in Pytorch for medical image segmentation. I should normalise my data.</p>
<p>Should I apply a min-max scale (range 0 to 1) before applying the normalisation or should I apply the z-score normalisation directly?</p>
<ol>
<li><p>What is the best approach if the dataset comes from a single source of data?</p>
</li>
<li><p>What if the samples come from multiple sources?</p>
</li>
</ol>

<machine-learning><deep-learning><data-preprocessing><image-segmentation><normalisation>
Should I apply a min-max scale (range 0 to 1) before applying the normalisation or should I apply the z-score normalisation directly?
Janikas
# Should I apply a min-max scale (range 0 to 1) before applying the normalisation or should I apply the z-score normalisation directly?

(Asked by: username_0 on 2023-06-26)

I want to implement a neural network in Pytorch for medical image segmentation. I should normalise my data.

Should I apply a min-max scale (range 0 to 1) before applying the normalisation or should I apply the z-score normalisation directly?

1. What is the best approach if the dataset comes from a single source of data?
2. What if the samples come from multiple sources?

**Tags:** machine-learning, deep-learning, data-preprocessing, image-segmentation, normalisation


---

## 1 answers

### Answer by username_1 on 2023-06-26. Score: 2

There is, beside of numerical *losses* not difference between directly using z-normalization and first min-max and then z-normalization.

##### Explanation

Both are affine transformations and a combination of affine transformations is again an affine transformation. Since there is only one(\*) affine transformation that results on zero-mean and variance of one, the z-normalization will (kind of) undo all previous affine transformations to achieve this goal.

(\*): In fact there are two and you could get the other by multiplying every value with -1. But this is just a silly detail and does not matter for this question.


---

