Search code examples
image-processingcomputer-visionnormalizationdata-miningpybrain

Computer Vision: Calculate normalized value of descriptors


I am doing image classification project and i have made the corpus of features.

I want to normalize my features for the input of PyBrain between -1 to 1 I am using the following formula to normalize the features

Normalized value = (Value - Mean ) / Standard Deviation 

but it is giving me the normalized some values between -3 to 3 which is very inaccurate.

I have 100 inputs in pybrain and 1 output of pybrain.


Solution

  • The equation you used is that of standardization. It does not guarantee your values are in -1;1 but it rescales your data to have a mean of 0, and a standard deviation of 1 afterwards. But points can be more than 1x the standard deviation from the mean.

    There are multiple options to bound your data.

    1. Use a nonlinear function such as tanh (very popular in neural networks)
    2. center, then rescale with 1/max(abs(dev))
    3. preserve 0, then rescale with 1/max(abs(dev))
    4. 2*(x-min)/(max-min) - 1
    5. standardize (as you did) but truncate values to -1;+1
    6. ... many more