Syntax:
<feature set> meansub <feature> <source> [optional flags]
Example1:
fs meansub FEATnorm FEAT -a 2
This method works only on FMatrix features. The mean will be subtracted and the coefficients divided by <a> times the standard deviation. In the example above the new feature FEATnorm has then a mean of {0 0 ...} and the new deviation is {0.5 0.5 ...}.
Example2:
fs meansub FEATnorm FEAT -mean {1.0 1.0 1.0 1.0 1.0}
Here a user defined mean vector will be subtracted but no normalization will be
done. In the same way a normalization can be done with -dev
or both things can
be done by using both flags. Of course the dimension of the user defined vectors
must be choosen equal to the dimension of the source feature.
Instead of -dev
a vector with the mean of the squared values can be choosen
with -smean
but only when -mean
is also used. The deviation is then
calculated by:
dev = sqrt(smean - mean^2)
.
Example3:
fs meansub FEATnorm FEAT -upMean vecFEATmean -upSMean vecFEATsmean
By using the flags -upMean
and -upSMean
you can accumulate
the mean values and the mean of the squared values in FVector objects for later use. You can
reinit the FVector objects by setting their count to 0:
vecFEATmean configure -count 0
The flags have no effect if either -mean
or -dev
are used.
-upSMean
has only an effect if it is used together with -upMean
.
Which mean and deviation vector will used on the source feature can be set with the
-useup
flag. Default is to use the updated mean (and deviation).
Optional flags:
-a <a>
-mean <vector>
-dev <vector>
-smean <vector>
-upMean <FVector object>
-upSMean <FVector object>
-useup <switch>