Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

implementation help of Gaussian RBM in matlab

Asked by subha

subha

on 23 Nov 2013
Latest activity Commented on by subha

subha

on 28 Nov 2013
Accepted Answer by Greg Heath

Greg Heath

First i would like to know how to make visible layer to zero mean and unit variance.I have seen in few example they followed below way.but i couldnot understand

subtracting the corresponding data with its mean and divide it by standard division, my data becomes NaN.

I am new to matlab and Neural networks.

data= batchdata(:,:,batch);
mean_data=mean(data,1),data=bsxfun(data,mean_data);
std_data=std(data,[],1);
data=bsxfun(@rdivide,data,std_data);

i am not able to find the reason

can anybody help to clear this

1 Comment

Greg Heath

Greg Heath

on 23 Nov 2013

"subtracting the corresponding data with its mean and divide it by standard division, my data becomes NaN."

Did it ever occur to you to post that code?

subha

subha

1 Answer

Answer by Greg Heath

Greg Heath

on 23 Nov 2013
Accepted answer
doc zscore
help zscore
doc mapstd
help mapstd

Hope this helps.

  • Thank you for formally accepting my answer*

Greg

3 Comments

subha

subha

on 23 Nov 2013

i greg, thanks for your answer.

But i am sure mean zero and unit variance can be achieved in that way also.But i would like to know why it didn't work.What mistake i have done when i implement it.

thanks and regards subha

Greg Heath

Greg Heath

on 25 Nov 2013
 [x, t ] = engine_dataset;
 [ I N ] = size(x)   %  2  1199
 [ O N ] = size(t)   %  2  1199
 z    = [ x; t];
 muz  = mean(z')';
 stdz = std(z')';
% [ muz stdz ] = [ 141.2  090.7
%                 1259.5  354.8
%                  754.2  548.7
%                  961.7  466.1 ]
 zn    = ( z - repmat(muz,1,N))./repmat(stdz,1,N);
 muzn  = mean(zn')';
 stdzn = std(zn')';
% [ muzn stdzn ] = [  -0.0000    1.0000
%                      0.0000    1.0000
%                     -0.0000    1.0000
%                     -0.0000    1.0000 ]
subha

subha

on 28 Nov 2013

thanks.

Greg Heath

Greg Heath

Contact us