scale data for NN

Hi,
How do I scale data in a neural network multilayer backpropagation?

 Risposta accettata

Greg Heath
Greg Heath il 17 Mag 2012

0 voti

You do not have to scale the data because variables are AUTOMATICALLY scaled to {-1,1} with MAPMINMAX by NEWFF, FITNET, PATTERNNET AND FEEDFORWARDNET.
The command
type feedforwardnet
yields these commands
========================
% Inputs
net.numInputs = 1;
net.inputConnect(1,1) = true;
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
% Outputs
net.outputConnect(Nl) = true;
net.outputs{Nl}.processFcns = {'removeconstantrows','mapminmax'};
===================================================
If you wish, you can replace either occurrance of MAPMINMAX with 'mapstd' (zero-mean/unit-variance) or 'none'.
I prefer to use MAPSTD before creating the net to try to understand the input/output relationships via plots, correlation coefficients and outliers.
Then I accept the automatic minmax normalization instead of removing or changing it.
Hope this helps.
Greg

2 Commenti

mustafa
mustafa il 18 Mag 2012
Thanks Greg for ur reply. I want to build my program by own ( I dont use the toolbox). R there formula for scale?. Actually, i found this formula "I = Imin + (Imax-Imin)*(X-Dmin)/(Dmax-Dmin)" by searching in google but I dont know the reference it.
mustafa
mustafa il 18 Mag 2012
so I see old ur comment . You used this formula "xn = -1+ 2*(x-xmin)/(xmax-xmin) ;". is this formula for scalling? if yes, can I know the refrence? So what do you meant the numbers(1 &2) in formula.

Accedi per commentare.

Più risposte (1)

Greg Heath
Greg Heath il 18 Mag 2012

0 voti

1. Derive a linear tranformation xn(x) = a.*x + b such that
xn( x = min(x) ) = -1
xn( x = max(x) ) = +1
2. Derive a linear tranformation xn(x) = a.*x + b such that
mean(xn) = 0
var( xn ) = 1
Hope this helps.
Greg

1 Commento

mustafa
mustafa il 18 Mag 2012
sorry Greg, it is not clear. plz I need some details about this.

Accedi per commentare.

Categorie

Scopri di più su Deep Learning Toolbox in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by