Skip to content

Commit

Permalink
STYL: Correct difference variance formula (docs)
Browse files Browse the repository at this point in the history
Correct error in difference variance formula as pointed out by @clarehchao.

Additionally, fix an error in the exampleCT settings (enabled shape features erroneously listed as glcm features).
  • Loading branch information
JoostJM committed Sep 5, 2017
1 parent 81f32fd commit 147c1c8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
44 changes: 28 additions & 16 deletions examples/exampleSettings/exampleCT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,7 @@ imageType:
Wavelet: {}

featureClass:
shape: ['Volume',
'SurfaceArea',
'SurfaceVolumeRatio',
'Sphericity',
'SphericalDisproportion',
'Maximum3DDiameter',
'Maximum2DDiameterSlice',
'Maximum2DDiameterColumn',
'Maximum2DDiameterRow',
'MajorAxis',
'MinorAxis',
'LeastAxis',
'Elongation',
'Flatness'] # Only enable these shape descriptors (disables redundant Compactness 1 and Compactness 2)
firstorder:
glcm: # disable redundant Compactness 1 and Compactness 2 features by specifying all other shape features
shape: # disable redundant Compactness 1 and Compactness 2 features by specifying all other shape features
- 'Volume'
- 'SurfaceArea'
- 'SurfaceVolumeRatio'
Expand All @@ -44,6 +29,33 @@ featureClass:
- 'LeastAxis'
- 'Elongation'
- 'Flatness'
firstorder:
glcm: # Disable SumAverage by specifying all other GLCM features available
- 'Autocorrelation'
- 'JointAverage'
- 'ClusterProminence'
- 'ClusterShade'
- 'ClusterTendency'
- 'Contrast'
- 'Correlation'
- 'DifferenceAverage'
- 'DifferenceEntropy'
- 'DifferenceVariance'
- 'Dissimilarity'
- 'JointEnergy'
- 'JointEntropy'
- 'Homogeneity1'
- 'Homogeneity2'
- 'Imc1'
- 'Imc2'
- 'Idm'
- 'Idmn'
- 'Id'
- 'Idn'
- 'InverseVariance'
- 'MaximumProbability'
- 'SumEntropy'
- 'SumSquares'
glrlm:
glszm:

Expand Down
2 changes: 1 addition & 1 deletion radiomics/glcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def getDifferenceVarianceFeatureValue(self):
.. math::
\textit{difference variance} = \displaystyle\sum^{N_g-1}_{k=0}{(1-DA)^2p_{x-y}(k)}
\textit{difference variance} = \displaystyle\sum^{N_g-1}_{k=0}{(k-DA)^2p_{x-y}(k)}
Difference Variance is a measure of heterogeneity that places higher weights on
differing intensity level pairs that deviate more from the mean.
Expand Down

0 comments on commit 147c1c8

Please sign in to comment.