# Features value (mean and variance)

**URL:** <https://discourse.slicer.org/t/features-value-mean-and-variance/15850>\
**Category:** Radiomics\
**Created:** [February 4, 2021, 9:51pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850 "2021-02-04T21:51:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleja\_Ichina](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aleja_ichina/32/9597_2.png) [@Aleja\_Ichina](https://discourse.slicer.org/u/Aleja_Ichina)\
**Post date:** [February 4, 2021, 9:51pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/1 "2021-02-04T21:51:12Z")

</div>

Hi,

Sorry, I have a question, why mean value and variance value are big. For example, I’m working with DICOM abdomen images and I segmented these in 3D slicer and I converted to .nrrd but when I apply pyradiomics the mean value is 133. I don’t have idea what is the range and I whan to create an histrogram but I tried it and I failed. Help me please

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [March 9, 2021, 12:25pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/2 "2021-03-09T12:25:31Z")

</div>

A mean value without any context is meaningless. I cannot say without knowing what you would expect. Also, preprocessing can alter the interpretation of your values (e.g. by applying normalization).  
What settings did you use? What structures did you segment? What value would make sense to you for mean?

Range is available, it is one of the firstorder features.

---

<div class="post-metadata">

**Author:** ![Aleja\_Ichina](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aleja_ichina/32/9597_2.png) [@Aleja\_Ichina](https://discourse.slicer.org/u/Aleja_Ichina)\
**Post date:** [March 10, 2021, 10:52pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/3 "2021-03-10T22:52:29Z")

</div>

![2021-03-08-Scene.jpg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/e/9ea66854407cf73d5f83b103fa17eb47daec6c68.jpeg) ![2021-03-04-Scene.jpg](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/1/b121bbd417af9a776b60a014d23be9a45073f005.jpeg)

Hi Joost,

I segmented the liver. The range is available but what happens if I have a different range as the image shows? How can I interpret my data?  
I need radiomics features to develop a neural network according to the values of these features. For example, it is a fatty liver if its mean value has a range [-100,150] (this is just a guess.)  
I don’t have idea how to normalize my dataset. Could you help me, please? I extracted the mask and the image to apply pyradiomics in nrrd format

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [March 22, 2021, 4:37pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/4 "2021-03-22T16:37:57Z")

</div>

I’m having difficulty understanding your specific question. If I understand correctly, you want to differentiate between fatty and non-fatty liver? In any case, in radiomics studies you have some outcome label defined per case (e.g. yes/no to fatty liver). You the analyze if features or a combination of features is correlated to your outcome. That way you can make a model that can take the segmented image as input and output a prediction of your outcome for new cases.

In the PyRadiomics documentation at [pyradiomics.readthedocs.io](http://pyradiomics.readthedocs.io) you can find how to enable normalization.

---

<div class="post-metadata">

**Author:** ![Aleja\_Ichina](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/aleja_ichina/32/9597_2.png) [@Aleja\_Ichina](https://discourse.slicer.org/u/Aleja_Ichina)\
**Post date:** [March 22, 2021, 4:50pm UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/5 "2021-03-22T16:50:41Z")

</div>

Thank you so much, I understand.  
I have another question: Why is it important to normalize the data?

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [April 12, 2021, 8:27am UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/6 "2021-04-12T08:27:57Z")

</div>

Normalization strives to remove systematic differences between images that are due to differences in acquisition and therefore represent noise that can suppress any signal in your data.

For example, if 1 scanner stores it’s values with 10x than another scanner, your model will most likely reflect which scanner acquired the image, and not any true differences in texture, etc.  
For CT this is generally less of a problem and normalization may be switched off, as the values are linked to an absolute value (Hounsfield Units reflecting density/atomic number of the tissue at that specific voxel). However, MR uses a _relative_ intensity, so the value in itself doesn’t really mean anything, just in relation to other values. Therefore there is no ‘standard’ value to compare against.

Normalization in PyRadiomics is fairly simple, and better methods probably exist, but are outside the scope of the PyRadiomics project. In short, PyRadiomics assumes that your input images reflect more or less the same area in your patients and should therefore have a comparable range of intensity values. This is then enforced to be so by subtracting the mean and dividing by the standard deviation (meaning the mean and standard deviation afterwards will be 0 and 1, respectively, though the latter can be scaled by `normalizationScale`).  
Any differnces between ROIs should be retained as often, the ROI represents just a very small area of the image and should not have a large influence on the overall mean and standard deviation.

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [April 12, 2021, 8:33am UTC](https://discourse.slicer.org/t/features-value-mean-and-variance/15850/7 "2021-04-12T08:33:30Z")

</div>

Be aware that in your case, the ROI actually _does_ represent a rather large part of the image, and that normalization may also ‘normalize’ some of the differences between your cases (fatty/non-fatty liver). If you are analyzing cases from just 1 scanner, you may consider to not use normalization, as there are likely to be no systematic differences in acquistion within 1 scanner (if also the same acquisition protocol is used).

That said, if you analyze both with and without normalization and the normalized cases function just as good as the non-normalized ones, I’d advise to use normalization as they are more likely to be generalizable to cases acquired using different scanners/acquisition protocols.
