```Date: Oct 17, 2013 8:49 AM
Author: chaudhry
Subject: Re: Improving ANN results

"Greg Heath" <heath@alumni.brown.edu> wrote in message <l3kj60\$mlt\$1@newscl01ah.mathworks.com>...> "Greg Heath" <heath@alumni.brown.edu> wrote in message <l3khqr\$1fe\$1@newscl01ah.mathworks.com>...> > "chaudhry " <bilal_zafar9@yahoo.com> wrote in message <l3ebuu\$evs\$1@newscl01ah.mathworks.com>...> >  > > > How to improve ANN results by reducing error through hidden layer size, through MSE, or by using while loop?> > > > Your data is not a good learning example. (Small size, constant x(1,:), weak relationship between input and target )> > > > 1. Practice on MATLAB data (e.g., simplefit_dataset) > > close all, clear all, clc> format short> >  x = [31 9333 2000;31 9500 1500;31 9700 2300;31 9700 2320;...>         31 9120 2230;31 9830 2420;31 9300 2900;31 9400 2500]'>  t = [35000;23000;3443;2343;1244;9483;4638;4739]'> xnew = [31 9333 2000]'> > % [ x, t ] = simplefit_dataset;    % Better learning example> > [ I N ]   = size( x )              % [ 3 8 ]> [ O N ] = size( t )               % [ 1 8 ]> > %Standardization?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! why standardizing> varx = var( x')         %  1e5 * [  0    0.585    1.63 ]  %Huge    > vart =  var( t )         %  1.47e8                             % Ditto> > % Delete x(1,:) and standardize!!!!!!!!we have deleted beacuse itz variance=0> > x          = x(2:3,:);      %Omit for simplefit_dataset!!!!!!!?> zx        = zscore(x',1)';!!!!!!!!!!!!!!!!!!what is this  i cant understnd tht> zt         = zscore(t',1)';!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!what is this  i cant understnd tht> MSE00 = var(t',1)              % = 1 Reference Mse   > Ntst     = round(0.15*N)    % = 1 default> Ntrials = max(10,30/Ntst)  % 30  !!!!!what is this criteria for trials> > % Use default No. of hidden nodes (10)> > net = fitnet;> > rng(0)> for i=1:Ntrials>     net           = configure(net,x,t);>     [net tr ]    = train(net,x,t);>     R2trn(i,1)  = 1 - tr.best_perf/MSE00;     !!!!!!!!!!!!!!!!!!what is this  i cant understnd tht  ..what R2TRN(i,1)>     R2val(i,1)  = 1 - tr.best_vperf/MSE00; >     R2tst(i,1)  =  1 - tr.best_tperf/MSE00;> end> R2s           = [ R2trn R2val R2tst ]> %why finding min.med...means....std.....maxs.....> minR2s     = min(R2s)        % -13.2021  -17.1237  -22.9422> medR2s    = median(R2s)  %    0.7096     0.4177      0.1100> meanR2s  = mean(R2s)     %   -0.8757   -1.2760      -1.8358> stdR2s      = std(R2s)          %   3.4060     3.9508       4.8567> maxR2s    = max(R2s)        %   1.0000     1.0000       0.9965> sortR2s     = sort(R2s) > > % sortR2s     =                         -13.2021  -17.1237  -22.9422> %                                               -10.4006   -9.8592   -8.5426> %                                                -4.5224   -6.3693   -6.8485> %                                                -4.1019   -5.0681   -6.5369> %                                                -3.7170   -3.6865   -5.7350> %                                                -2.0340   -2.4595   -5.0384> %                                                -1.7259   -2.4565   -4.0096> %                                                -1.3995   -1.6079   -3.6787> %                                                -1.2526   -1.6025   -0.5167> %                                                -0.2069   -1.0937   -0.3695> %                                                -0.1213   -0.6480   -0.2804> %                                                 0.1603   -0.2390   -0.2782> %                                                 0.4618    0.1275   -0.2124> %                                                 0.6146    0.1944   -0.1174> %                                                 0.6782    0.2760    0.0623> %                                                 0.7410    0.5594    0.1577> %                                                 0.9138    0.7007    0.2807> %                                                 0.9301    0.7012    0.3786> %                                                 0.9488    0.7098    0.4315> %                                                 0.9736    0.7654    0.4789> %                                                 0.9917    0.9362    0.4834> %                                                 0.9999    0.9819    0.6334> %                                                 1.0000    0.9890    0.7886> %                                                 1.0000    0.9957    0.8014> %                                                 1.0000    0.9982    0.8439> %                                                 1.0000    0.9996    0.9090> %                                                 1.0000    0.9996    0.9091> %                                                 1.0000    0.9997    0.9253> %                                                 1.0000    0.9998    0.9510> %                                                 1.0000    1.0000    0.9965> > % Note that only 2 of 30 designs have R2tst >= 0.95  !!!> > % In contrast, for the simplefit_data set (x(1,:) NOT deleted)> % > % Ntrials =     10> % R2s =              1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    1.0000    1.0000> %                         1.0000    0.9997    1.0000> %                         1.0000    1.0000    0.9999> > Now try minimizing the number of hidden nodes for the simplefit example.> > Hope this helps.> > Gregsir  greg....what should i conclude ...which is to use ....delete  row 1 of  dataset or notsir why u didnt counter weights and sir by giving loop to trials...what happens...is  that not better if v give loop for mse value.......such that system will train untill the mse value is at its minimum(what v have given)sir i am using dataset of excel sheet of 79 cross 30 ..matrix.....which  i have divided as inputs and targets....sir in the code above i have mentioned the lines which i didnt understnd so plz kindly explain me that
```