test_feature_normalization¶
Module: tests.unittests.nodes.postprocessing.test_feature_normalization
¶
A module that tests the
postprocessing
node
Author: | Andrei Ignat (Andrei_Cristian.Ignat@dfki.de) |
---|---|
Created: | 2014/06/06 |
Inheritance diagram for pySPACE.tests.unittests.nodes.postprocessing.test_feature_normalization
:
Class Summary¶
Classes¶
GaussianFeatureNormalizationTestCase
¶
-
class
pySPACE.tests.unittests.nodes.postprocessing.test_feature_normalization.
GaussianFeatureNormalizationTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_no_change
()[source]¶ checks what the node does to already Gaussian data
- Principle
1) generate data points for the FeatureVector which already follow the Gaussian distribution 2) train the node using these data points 3) stop the training in order to compute the multiplication variable and the translation variable
- In theory, since the data is already Gaussian generated:
- the multiplication factor should be 1
- the translation factor should be 0
-
HistogramFeatureNormalizationTestCase
¶
-
class
pySPACE.tests.unittests.nodes.postprocessing.test_feature_normalization.
HistogramFeatureNormalizationTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
EuclideanFeatureNormalizationTestCase
¶
InfinityNormFeatureVisualizationTestCase
¶
OutlierFeatureNormalizationTestCase
¶
-
class
pySPACE.tests.unittests.nodes.postprocessing.test_feature_normalization.
OutlierFeatureNormalizationTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_no_outliers
()[source]¶ runs the OutlierFeatureNormalizationNode with no outliers
- Principle
- No point in the training data set will be considered to be an outlier in the present case. In other words, this test only checks whether the resulting FeatureVector contains data points only within the [0,1] range
-
test_with_outliers
()[source]¶ test how the class reacts when part of the data is excluded
- Principle
In this test, we exclude half of the elements in each feature of the feature vector. The test itself therefore lies in seeing whether the middle half of the dataset is normalized between 0 and 1.
This happens if the following conditions are met:
- the translation factor excludes(in this particular case) the first and last quarter of the data set
- the multiplication factor normalizes the array by considering the maximum value to be half of the initial maximum value
The example is best understood by delving into the source code.
-