How to normalize new inputs with mapminmax ?

9 views (last 30 days)
Hello, I have normalized my data with mapminmax which gives values between -1 and 1. However, when I present new inputs to my network, knowing that the max of these is greater than the maximum of the training data, I will have As the normalization interval [-1,1.5]. what do you think ?

Accepted Answer

Greg Heath
Greg Heath on 28 Jun 2017
Edited: Greg Heath on 28 Jun 2017
You do not HAVE to normalize anything because the neural net AUTOMATICALLY normalizes input and target to [-1,1].
HOWEVER, I RECOMMEND USING MAPSTD BEFORE TRAINING in order to detect and either modify or remove outliers.
My advice:
1. Size input and target matrices
2. Plot x, t, and t vs x
3. Apply MAPSTD to deal with outliers
4. If outliers are modified or removed,
replot the affected variables.
5. Train and obtain e = t-y
6. plot y & t and e
Hope this helps
Thank you for formlly accepting my answer.
Greg
  2 Comments
Hamza Ali
Hamza Ali on 1 Jul 2017
Thank you for your answer. I added these two instructions before training my networks.
net.input.processFcns = {'removeconstantrows','mapminmax','mapstd'};
net.output.processFcns = {'removeconstantrows','mapminmax','mapstd'};
Greg Heath
Greg Heath on 3 Jul 2017
No.!
Use MAPSTD to filter (i.e., delete or modify ) data for which
(z-meanz)./stdz > yourtreshold
Plotting will help determine what threshold to use for outlier deletion and what threshold to use for outlier modification.
Then use the resulting unnormalized filtered data as inputs to the training algorithm and proceed as usual using defaults.
Although you could
a. Use the normalized filtered data as inputs
and/or
b. Use a nondefault transformation for learning and testing.
Why in the world would you want to juggle two transformations at the same time when it isn't necessary?
Hope this helps,
Greg

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!