Main Page | Report this Page
Computers Forum Index  »  Computer Artificial Intelligence - Neural Nets  »  Normalizing NN complex data input...
Page 1 of 2    Goto page 1, 2  Next

Normalizing NN complex data input...

Author Message
George Campbel...
Posted: Sat Jul 11, 2009 2:47 am
Guest
I am working on complex numberand think of normalizing the input XOR
number before applying to the neural network.

For real number, data normalization can be done in various ways among
which are

for data x(n) , n=1:100;
let Mx =mean of x
Vx= Variance of x
Maxx=Maximum value in x
Minx= minimum value in x
MagMaxx= Maximum magnitude in x
MagMinx=Minimu magnitude in x
a) newx = (x- Mx)/(Maxx- Minx)

another method is
b) newx= x/(Maxx - Minx)
etc.

But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

i am thinking of using any of this,
newx= (x-Mx)/(MagMaxx-MagMinx)

or

newx= x/square of magnitude of x

or newx= x/MagMaxx
 
Greg...
Posted: Sat Jul 11, 2009 11:24 am
Guest
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
I am working on complex numberand think of normalizing the input XOR
number before applying to the neural network.

For real number, data normalization can be done in various ways among
which are

for data x(n) , n=1:100;
let Mx =mean of x
Vx= Variance of x
Maxx=Maximum value in x
Minx= minimum value in x
MagMaxx= Maximum magnitude in x
MagMinx=Minimu magnitude in x
a)  newx = (x- Mx)/(Maxx- Minx)

another method is
b) newx= x/(Maxx - Minx)
etc.

But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

i am thinking of using any of this,
newx= (x-Mx)/(MagMaxx-MagMinx)

or

newx= x/square of magnitude of x

or newx= x/MagMaxx

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg
 
Greg...
Posted: Fri Jul 24, 2009 8:35 am
Guest
On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x =

-0.3000 - 0.4000i -0.3000 - 0.4560i -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

Quote:
sumclockmin = 2009+1+1+0+0+0
sumclockmax = 2009+12+31+23+59+59

sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3 % observations
I = 2 % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn = (z-meanz)./(stdz)

sumclockmin =
2011
sumclockmax =
2193
sumclocknow =
2.0650e+003
state0 =
6.3771e+008
N =
3
I =
2
z =
-0.6328 -0.0428 3.0043
0.6878 -2.3708 0.2313
meanz =
0.7763 0.7763 0.7763
-0.4839 -0.4839 -0.4839
varz =
3.8102 3.8102 3.8102
2.7223 2.7223 2.7223
stdz =
1.9520 1.9520 1.9520
1.6499 1.6499 1.6499
err =
0 0 0
0 0 0
zn =
-0.7218 -0.4196 1.1414
0.7101 -1.1436 0.4335

Hope this helps.

Greg
 
George Campbel...
Posted: Fri Jul 24, 2009 9:09 am
Guest
On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
Quote:
On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:



On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin >         2011
sumclockmax >         2193
sumclocknow >   2.0650e+003
state0 >   6.3771e+008
N >      3
I >      2
z >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err >      0     0     0
     0     0     0
zn >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?
Thanks
Campbel
 
Greg...
Posted: Fri Jul 24, 2009 9:45 am
Guest
On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:





On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > >         2011
sumclockmax > >         2193
sumclocknow > >   2.0650e+003
state0 > >   6.3771e+008
N > >      3
I > >      2
z > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > >      0     0     0
     0     0     0
zn > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.
 
George Campbel...
Posted: Sat Jul 25, 2009 12:00 pm
Guest
On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
Quote:
On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:



On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > >         2011
sumclockmax > > >         2193
sumclocknow > > >   2.0650e+003
state0 > > >   6.3771e+008
N > > >      3
I > > >      2
z > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > >      0     0     0
     0     0     0
zn > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.


Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

Thanks,
Campbel.
 
Ian Parker...
Posted: Sun Jul 26, 2009 3:17 pm
Guest
On Jul 25, 1:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:





On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > >         2011
sumclockmax > > > >         2193
sumclocknow > > > >   2.0650e+003
state0 > > > >   6.3771e+008
N > > > >      3
I > > > >      2
z > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > >      0     0     0
     0     0     0
zn > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

Thanks,
Campbel.- Hide quoted text -

- Show quoted text -

Whether or not you can use complex number depends on how your neural
network works, what is in its guts.

If you are performing what amounts to matrix algebra complex numbers
are perfectly permissible. There are in fact theorems about this. If
you have a HERMETIAN matrix. A matrix is Hermetian if

a(i,j) = a*(j,i) where * denotes complex conjugation, the eigenvalues
will all be real.

What I would like to know is how did the Neural Network arise? If it
comes from electronics or engineering you are probably Hermetian.


- Ian Parker
 
Greg...
Posted: Thu Aug 06, 2009 12:50 am
Guest
On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:





On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > >         2011
sumclockmax > > > >         2193
sumclocknow > > > >   2.0650e+003
state0 > > > >   6.3771e+008
N > > > >      3
I > > > >      2
z > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > >      0     0     0
     0     0     0
zn > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg
 
George Campbel...
Posted: Sun Aug 09, 2009 3:00 am
Guest
On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:
Quote:
On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:



On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > >         2011
sumclockmax > > > > >         2193
sumclocknow > > > > >   2.0650e+003
state0 > > > > >   6.3771e+008
N > > > > >      3
I > > > > >      2
z > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > >      0     0     0
     0     0     0
zn > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

So newx is now the input to the complex valued network. I observed
that the value i have for newx is larger than the values i
originally fed to the normalization equation and this results in large
error during training.

How best can i normalized my input data prior to feeding it to neural
network ?
Thanks,
Campbel

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
-0.3000 - 0.4000i -0.3000 - 0.4560i -0.2830 - 0.3870i

Quote:
newx=(x-mean(x))./(var(x))

newx
-3.9334 + 9.9491i -3.9334 -28.9218i 7.8667 +18.9727i
 
Greg...
Posted: Tue Aug 11, 2009 6:32 pm
Guest
On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > >         2011
sumclockmax > > > > > >         2193
sumclocknow > > > > > >   2.0650e+003
state0 > > > > > >   6.3771e+008
N > > > > > >      3
I > > > > > >      2
z > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > >      0     0     0
     0     0     0
zn > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

Quote:
So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

Quote:
How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg
 
George Campbel...
Posted: Wed Aug 12, 2009 9:50 am
Guest
On Aug 12, 2:32 am, Greg <he... at (no spam) alumni.brown.edu> wrote:
Quote:
On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:



On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > > >         2011
sumclockmax > > > > > > >         2193
sumclocknow > > > > > > >   2.0650e+003
state0 > > > > > > >   6.3771e+008
N > > > > > > >      3
I > > > > > > >      2
z > > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > > >      0     0     0
     0     0     0
zn > > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized..

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg

Hope this is the corrected formula ?

z = x + j*y;
zn = (z-mean(z))./std(z);
 
Greg...
Posted: Thu Aug 13, 2009 1:57 am
Guest
On Aug 12, 5:50 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Aug 12, 2:32 am, Greg <he... at (no spam) alumni.brown.edu> wrote:





On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail..com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0..3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > > > >         2011
sumclockmax > > > > > > > >         2193
sumclocknow > > > > > > > >   2.0650e+003
state0 > > > > > > > >   6.3771e+008
N > > > > > > > >      3
I > > > > > > > >      2
z > > > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > > > >      0     0     0
     0     0     0
zn > > > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg

Hope this is the corrected formula ?

z = x + j*y;
zn = (z-mean(z))./std(z);- Hide quoted text -

Yes. For vectors,

meanz = mean(ztrn);
stdz = std(ztrn);

ztrnn = (ztrn-meanz)./stdz;
zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;

For matrices, use repmat to create conforming
dimensions for meanz and stdz.

Hope this helps.

Greg
 
George Campbel...
Posted: Thu Aug 13, 2009 8:24 am
Guest
On Aug 13, 9:57 am, Greg <he... at (no spam) alumni.brown.edu> wrote:
Quote:
On Aug 12, 5:50 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:





On Aug 12, 2:32 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > > > > >         2011
sumclockmax > > > > > > > > >         2193
sumclocknow > > > > > > > > >   2.0650e+003
state0 > > > > > > > > >   6.3771e+008
N > > > > > > > > >      3
I > > > > > > > > >      2
z > > > > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > > > > >      0     0     0
     0     0     0
zn > > > > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg

Hope this is the corrected formula ?

z = x + j*y;
zn = (z-mean(z))./std(z);- Hide quoted text -

Yes. For vectors,

meanz = mean(ztrn);
stdz     = std(ztrn);

ztrnn = (ztrn-meanz)./stdz;
zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;

For matrices, use repmat to create conforming
dimensions for meanz and stdz.

Hope this helps.

Greg- Hide quoted text -

- Show quoted text -

Prof,

Hope this is ok now ?

Quote:
ztrn= [-.3-.4i,-.3-.456i,-.283-.387i]
meanz = mean(ztrn);

stdz = std(ztrn);
ztrnn = (ztrn-meanz)./stdz

ztrn
-0.3000 - 0.4000i -0.3000 - 0.4560i -0.2830 - 0.3870i


ztrnn
-0.1493 + 0.3776i -0.1493 - 1.0978i 0.2986 + 0.7201i

Quote:


what does zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;
stad for.

Campbel
 
panosso...
Posted: Sat Aug 29, 2009 3:42 pm
Guest
On 13 ago, 05:24, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Aug 13, 9:57 am, Greg <he... at (no spam) alumni.brown.edu> wrote:





On Aug 12, 5:50 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 12, 2:32 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail..com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > > > > > >         2011
sumclockmax > > > > > > > > > >         2193
sumclocknow > > > > > > > > > >   2.0650e+003
state0 > > > > > > > > > >   6.3771e+008
N > > > > > > > > > >      3
I > > > > > > > > > >      2
z > > > > > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > > > > > >      0     0     0
     0     0     0
zn > > > > > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg

Hope this is the corrected formula ?

z = x + j*y;
zn = (z-mean(z))./std(z);- Hide quoted text -

Yes. For vectors,

meanz = mean(ztrn);
stdz     = std(ztrn);

ztrnn = (ztrn-meanz)./stdz;
zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;

For matrices, use repmat to create conforming
dimensions for meanz and stdz.

Hope this helps.

Greg- Hide quoted text -

- Show quoted text -

Prof,

Hope this is ok now ?

ztrn= [-.3-.4i,-.3-.456i,-.283-.387i]

meanz = mean(ztrn);
stdz     = std(ztrn);
ztrnn = (ztrn-meanz)./stdz

ztrn
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

ztrnn
  -0.1493 + 0.3776i  -0.1493 - 1.0978i   0.2986 + 0.7201i



what does zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;
stad for.

Campbel



Sorry .. .
.. .. but am I right or you both are using the wrong concept ?

firs of all, are you usig MATLAB, because if YES, you may use the ABS
function to get the SIZE_OF_THE_VECTOR instead of MEAN . . .so thet,
for your example x, we may have :

Quote:
x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
-0.3000 - 0.4000i -0.3000 - 0.4560i -0.2830 - 0.3870i

and then, after the following simple loop

for i=[1:3]
x(i) = (x(i))/(abs(x(i));
end

we will get :

Quote:
x

x
-0.6000 - 0.8000i -0.5496 - 0.8354i -0.5903 - 0.8072i

were all of the vectors on x array has 1 as the
SIZE_OS_THE_VECTOR . . .

[s]
Panosso
 
Greg...
Posted: Sun Sep 06, 2009 11:00 pm
Guest
On Aug 13, 4:24 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:
Quote:
On Aug 13, 9:57 am, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Aug 12, 5:50 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 12, 2:32 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Aug 8, 11:00 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Aug 6, 8:50 am, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 25, 8:00 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 5:45 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 24, 5:09 am, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

On Jul 24, 4:35 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:

On Jul 23, 11:23 pm, George Campbel <gcampbel2... at (no spam) gmail..com> wrote:

On Jul 11, 7:24 pm, Greg <he... at (no spam) alumni.brown.edu> wrote:
On Jul 10, 10:47 pm, George Campbel <gcampbel2... at (no spam) gmail.com> wrote:

I am working on complex number and think of normalizing the input XOR
number before applying to the neural network.

-----SNIP
But for a complex number, how do i solve the data normalization
because it contains real and imaginary part.

z = x + j*y;
zn = (z-mean(z))./std(z);

Hope this helps.

Greg

HiProf,

I observed that this doesnt work well for some data, e.g

x=[-.3-.4i,-.3-.456i,-.283-.387i]

x
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

y=(x-mean(x))./(var(x))

INCORRECT. SEE ABOVE

sumclockmin = 2009+1+1+0+0+0

sumclockmax = 2009+12+31+23+59+59
sumclocknow = sum(clock)

state0 = (2^31-1)*(sumclocknow-sumclockmin)/(sumclockmax-sumclockmin)
rand('state',state0 )
randn('state',state0 )

N = 3  % observations
I = 2  % inputs

z = rand(2,3) + randn(2,3)

meanz = repmat(mean(z')',1,N)
varz = repmat(var(z')',1,N)
stdz = repmat(std(z')',1,N)
err = stdz - sqrt(varz)
zn  = (z-meanz)./(stdz)

sumclockmin > > > > > > > > > >         2011
sumclockmax > > > > > > > > > >         2193
sumclocknow > > > > > > > > > >   2.0650e+003
state0 > > > > > > > > > >   6.3771e+008
N > > > > > > > > > >      3
I > > > > > > > > > >      2
z > > > > > > > > > >    -0.6328   -0.0428    3.0043
    0.6878   -2.3708    0.2313
meanz > > > > > > > > > >     0.7763    0.7763    0.7763
   -0.4839   -0.4839   -0.4839
varz > > > > > > > > > >     3.8102    3.8102    3.8102
    2.7223    2.7223    2.7223
stdz > > > > > > > > > >     1.9520    1.9520    1.9520
    1.6499    1.6499    1.6499
err > > > > > > > > > >      0     0     0
     0     0     0
zn > > > > > > > > > >    -0.7218   -0.4196    1.1414
    0.7101   -1.1436    0.4335

Hope this helps.

Greg

Hi prof Greg,

I think what i simply want to do is to normalize the input data vector
x using the method of
Newx = (x-mean(x))./std(x);

Do i need to initialize the random data ?

As worded, the question doesn't make sense.
Did you mean

Q: Do i need to initialize the random number generators?
A: No. However it makes life easy if you want to
repeat a learning run with weights that were randomly initialized.

Hope this helps.

Greg

P.S. I chose random data just to come up with an example.

Prof,

Thanks for the last response.

But what will happen if i want to normalized data x below ahead of
using it as neural network  input ?

x=[-.3-.4i,-.3-.456i,-.283-.387i]

I don't understand the question.

Greg

What i am trying to do is that, I have an input data x, (x in this
case is not a random number) ,
I want to normalized this data using
newx=(x-mean(x))./(var(x)) .

BZZZT!

Use the corrected formula.

So newx is now the input to the complex valued network. I observed
that the value i have for newx  is  larger than the values i
originally fed to the normalization equation and this results in large
error during training.

The scaling of your input should have little to do with the size of
your
error, Training should scale weights accordingly.

How best can i normalized my input data prior to feeding it to neural
network ?

Use the correct formula. If the data is not training data, you
have to use the mean and std obtained from training.

Hope this helps.

Greg

Hope this is the corrected formula ?

z = x + j*y;
zn = (z-mean(z))./std(z);- Hide quoted text -

Yes. For vectors,

meanz = mean(ztrn);
stdz     = std(ztrn);

ztrnn = (ztrn-meanz)./stdz;
zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;

For matrices, use repmat to create conforming
dimensions for meanz and stdz.

Hope this helps.

Greg- Hide quoted text -

- Show quoted text -

Prof,

Hope this is ok now ?

ztrn= [-.3-.4i,-.3-.456i,-.283-.387i]

meanz = mean(ztrn);
stdz     = std(ztrn);
ztrnn = (ztrn-meanz)./stdz

ztrn
  -0.3000 - 0.4000i  -0.3000 - 0.4560i  -0.2830 - 0.3870i

ztrnn
  -0.1493 + 0.3776i  -0.1493 - 1.0978i   0.2986 + 0.7201i

Why not calculate mean(ztrnn) and std(ztrnn) tocheck for yourself?


Quote:
what does zvaln = (zval-meanz)./stdz;
ztatn = (ztst-meanz)./stdz;
stad for.

The normalized validation and test data.

Hope this helps.

Greg
 
 
Page 1 of 2    Goto page 1, 2  Next
All times are GMT
The time now is Sat Nov 28, 2009 10:03 pm