Thread Subject:
problem with testing newff

Subject: problem with testing newff

From: faiza khan

Date: 25 Jun, 2012 07:49:06

Message: 1 of 11

hello
im faiza..im doing my project on speech recognition. i have used newff and trainrp for my network.it is trained correctly.i tested it using sim(net,input) function.the output it give is weird.i dont understand it.please can u help me. the data given to newff is collected from 36 people.they uttered first 10 digits of pashto language.data has 360 rows and 12 columns.its transpose given to sim. here's the code
function [net] = nn(input)
inputs = input;
A = [1 ; 2; 3 ; 4 ;5 ; 6 ; 7 ; 8 ;9 ; 10 ];
target = repmat(A,36,1);
net = newff(inputs',target',12);
net = initnw(net,1);
net.layers{1}.transferFcn = 'logsig';
net.layers{2}.transferFcn = 'tansig';
net.trainParam.epochs=50;
net.trainFcn = 'trainrp';
net = train(net,inputs',target');
end


the code for testing is
function [out1] = testing(net,inp)
input = (inp)';
out1 = sim(net,input);
end


 the output it gives is
Columns 1 through 8

    5.8730 4.9237 5.2588 4.4363 6.1004 4.4851 6.0459 6.6004

  Columns 9 through 16

    5.8423 6.0784 5.0081 5.0340 4.5923 6.5285 4.9167 6.3681

  Columns 17 through 24

    5.4162 6.1277 5.8132 5.7455 4.4250 5.5688 5.3741 4.4044

  Columns 25 through 32

    4.8240 5.1328 5.4030 4.4187 4.8750 6.2385 4.9825 3.9851

  Columns 33 through 40

    5.7125 4.4337 5.6709 5.7152 4.8082 5.2324 5.4639 5.0443

  Columns 41 through 48

    4.0132 5.8979 5.5714 5.5867 4.6752 6.1313 5.4412 4.7076

  Columns 49 through 56

    5.8082 5.9257 5.4939 5.0700 5.4370 3.5233 5.8292 5.6772

  Columns 57 through 64

    4.3685 4.7711 6.1782 5.1509 5.3406 4.8770 4.7628 4.8407

  Columns 65 through 72

    5.5492 6.1534 3.5791 4.0879 3.6750 5.9533 4.4291 4.2794

  Columns 73 through 80

    4.9108 5.9751 4.6258 4.5095 6.4539 5.3825 6.4861 6.5007

  Columns 81 through 88

    4.3931 5.5831 5.6546 5.5105 5.7171 4.6844 4.4875 5.1583

  Columns 89 through 96

    6.5685 5.7780 4.8688 5.9912 6.8957 6.1530 5.9038 6.1321

  Columns 97 through 104

    5.6081 6.0981 5.8423 5.9656 4.9657 3.9337 5.2042 5.0709

  Columns 105 through 112

    4.8548 5.6243 4.5042 6.0932 5.3219 4.3150 4.7385 5.7165

  Columns 113 through 120

    5.9830 4.5340 4.8386 5.4975 6.2997 5.2499 5.9044 5.7943

  Columns 121 through 128

    4.9780 4.4897 4.0719 4.7018 4.9238 6.5815 5.2562 6.7237

  Columns 129 through 136

    6.7677 4.8205 6.0458 6.2771 6.0010 5.0315 5.5009 5.2919

  Columns 137 through 144

    5.5077 4.7538 6.1837 6.3484 4.7778 6.6374 5.2317 4.8860

  Columns 145 through 152

    4.9719 5.3880 5.3152 5.8270 5.1045 6.0504 5.4374 3.7814

  Columns 153 through 160

    5.0452 5.2118 4.9397 4.8238 5.4505 4.9794 5.6053 6.0955

  Columns 161 through 168

    5.5155 4.3920 5.6489 6.0388 5.5931 5.5656 5.7943 5.6810

  Columns 169 through 176

    4.7083 4.3224 5.2673 4.8004 5.2950 5.1206 4.9927 5.4213

  Columns 177 through 184

    5.2880 6.3977 6.2130 5.2446 4.6313 5.4773 5.4737 5.8060

  Columns 185 through 192

    5.6917 6.0580 5.5691 5.6781 5.8385 5.1914 5.8142 5.4956

  Columns 193 through 200

    5.7248 5.7405 5.9182 6.0607 5.4018 5.0438 5.3680 5.2771

  Columns 201 through 208

    4.8404 5.3044 6.5197 6.4447 6.3491 6.1631 5.4550 5.7196

  Columns 209 through 216

    6.2017 5.5387 4.9662 4.8044 6.0276 4.3281 5.6601 5.7215

  Columns 217 through 224

    5.1911 5.7552 6.5644 6.0831 5.4770 5.3370 5.0382 4.6131

  Columns 225 through 232

    5.0674 5.7593 5.0113 5.1661 4.9419 5.9853 4.6350 5.4414

  Columns 233 through 240

    5.5064 5.6572 5.5351 5.2374 4.9883 4.9589 6.0502 4.7998

  Columns 241 through 248

    5.3144 6.2188 4.9655 4.6587 5.2346 5.4555 4.8066 5.4501

  Columns 249 through 256

    5.3598 5.8693 4.5100 6.0507 6.0774 5.7986 6.3140 6.0363

  Columns 257 through 264

    5.9949 5.9914 6.3033 5.3806 4.8013 5.7817 4.7125 4.4363

  Columns 265 through 272

    4.9725 5.2954 4.9869 4.8581 5.0924 6.0504 4.3920 5.2946

  Columns 273 through 280

    5.5244 4.9525 5.2133 4.6177 4.7012 4.6775 4.4400 5.4291

  Columns 281 through 288

    6.1691 5.7412 5.3969 5.4018 4.6190 5.0996 4.8630 4.6550

  Columns 289 through 296

    5.5693 5.2026 5.1053 5.2995 4.3205 4.8444 4.4920 5.3043

  Columns 297 through 304

    4.7757 4.9652 5.1068 4.2532 4.7127 5.8318 4.9308 4.8028

  Columns 305 through 312

    5.1926 5.2626 5.1408 4.4399 5.0079 5.5684 6.2719 4.7623

  Columns 313 through 320

    4.8319 5.7775 5.2189 5.2956 4.8078 5.2888 5.4223 5.1529

  Columns 321 through 328

    5.2689 5.6748 4.8849 5.4042 5.3555 5.2510 5.1365 4.7795

  Columns 329 through 336

    5.4509 5.4546 4.8362 4.5989 5.3091 4.6740 5.5470 5.4161

  Columns 337 through 344

    5.9327 5.2244 5.4093 5.6110 5.4324 5.3683 4.8545 4.7428

  Columns 345 through 352

    5.0910 4.6178 5.0860 5.1417 5.0786 5.1926 5.9070 4.9935

  Columns 353 through 360

    5.4601 5.2726 5.0257 5.0903 5.7919 4.6664 5.1237 5.0481

these are not according to the desired target.

Subject: problem with testing newff

From: Greg Heath

Date: 26 Jun, 2012 01:28:07

Message: 2 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <js955i$q2q$1@newscl01ah.mathworks.com>...
> hello
> im faiza..im doing my project on speech recognition. i have used newff and trainrp for my network.it is trained correctly.i tested it using sim(net,input) function.the output it give is weird.i dont understand it.please can u help me. the data given to newff is >collected from 36 people.they uttered first 10 digits of pashto language.

How are the digits coded?

> data has 360 rows and 12 columns. its transpose given to sim. here's the code
> function [net] = nn(input)
> inputs = input;
> A = [1 ; 2; 3 ; 4 ;5 ; 6 ; 7 ; 8 ;9 ; 10 ];
> target = repmat(A,36,1);
> net = newff(inputs',target',12);
> net = initnw(net,1);

Incorrect. Delete.

> net.layers{1}.transferFcn = 'logsig';
> net.layers{2}.transferFcn = 'tansig';

Incorrect. Delete.

> net.trainParam.epochs=50;
> net.trainFcn = 'trainrp';
> net = train(net,inputs',target');
> end

1. Using transposes in newff not recommended
2. Using class indices as targets not recommended
3. Want # of weights << # of output equations
4. Newff automatically uses initnw
5. Use defaults unless they don't work

inputs = input';
 [ I N ] = size(inputs) % [ 12 360 ]
classes = repmat(1:10,36,1); % class indices
N = length(classes) % 360
target = ind2vec(classes); % unit vector columns
[ O N ] == size(target) % [10 360]

6. Why H = 12?
    a. For O =1
Nw = (I+1)*H+(H+1)*O % = 169 Unknown weights
Neq = N*O % = 360 Output equations ~2*Nw
     b. For O =10
Nw = (I+1)*H+(H+1)*O % = 286 Unknown weights
Neq = N*O % = 3600 Output equations ~12*Nw

> the code for testing is
> function [out1] = testing(net,inp)
> input = (inp)';

Don't reuse variables.

> out1 = sim(net,input);
> end
>
> the output it gives is
> Columns 1 through 8
>
> 5.8730 4.9237 5.2588 4.4363 6.1004 4.4851 6.0459 6.6004
>
---------------------
> Columns 353 through 360
>
> 5.4601 5.2726 5.0257 5.0903 5.7919 4.6664 5.1237 5.0481
>
> these are not according to the desired target.

Impossible with tansig output activation.

Use tansig hidden, logsig or softmax for output.

Hope this helps.

Greg

Subject: problem with testing newff

From: faiza khan

Date: 26 Jun, 2012 15:55:07

Message: 3 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <js955i$q2q$1@newscl01ah.mathworks.com>...
> hello
> im faiza..im doing my project on speech recognition. i have used newff and trainrp for my network.it is trained correctly.i tested it using sim(net,input) function.the output it give is weird.i dont understand it.please can u help me. the data given to newff is collected from 36 people.they uttered first 10 digits of pashto language.data has 360 rows and 12 columns.its transpose given to sim. here's the code
> function [net] = nn(input)
> inputs = input;
> A = [1 ; 2; 3 ; 4 ;5 ; 6 ; 7 ; 8 ;9 ; 10 ];
> target = repmat(A,36,1);
> net = newff(inputs',target',12);
> net = initnw(net,1);
> net.layers{1}.transferFcn = 'logsig';
> net.layers{2}.transferFcn = 'tansig';
> net.trainParam.epochs=50;
> net.trainFcn = 'trainrp';
> net = train(net,inputs',target');
> end
>
>
> the code for testing is
> function [out1] = testing(net,inp)
> input = (inp)';
> out1 = sim(net,input);
> end
>
>
> the output it gives is
> Columns 1 through 8
>
> 5.8730 4.9237 5.2588 4.4363 6.1004 4.4851 6.0459 6.6004
>
> Columns 9 through 16
>
> 5.8423 6.0784 5.0081 5.0340 4.5923 6.5285 4.9167 6.3681
>
> Columns 17 through 24
>
> 5.4162 6.1277 5.8132 5.7455 4.4250 5.5688 5.3741 4.4044
>
> Columns 25 through 32
>
> 4.8240 5.1328 5.4030 4.4187 4.8750 6.2385 4.9825 3.9851
>
> Columns 33 through 40
>
> 5.7125 4.4337 5.6709 5.7152 4.8082 5.2324 5.4639 5.0443
>
> Columns 41 through 48
>
> 4.0132 5.8979 5.5714 5.5867 4.6752 6.1313 5.4412 4.7076
>
> Columns 49 through 56
>
> 5.8082 5.9257 5.4939 5.0700 5.4370 3.5233 5.8292 5.6772
>
> Columns 57 through 64
>
> 4.3685 4.7711 6.1782 5.1509 5.3406 4.8770 4.7628 4.8407
>
> Columns 65 through 72
>
> 5.5492 6.1534 3.5791 4.0879 3.6750 5.9533 4.4291 4.2794
>
> Columns 73 through 80
>
> 4.9108 5.9751 4.6258 4.5095 6.4539 5.3825 6.4861 6.5007
>
> Columns 81 through 88
>
> 4.3931 5.5831 5.6546 5.5105 5.7171 4.6844 4.4875 5.1583
>
> Columns 89 through 96
>
> 6.5685 5.7780 4.8688 5.9912 6.8957 6.1530 5.9038 6.1321
>
> Columns 97 through 104
>
> 5.6081 6.0981 5.8423 5.9656 4.9657 3.9337 5.2042 5.0709
>
> Columns 105 through 112
>
> 4.8548 5.6243 4.5042 6.0932 5.3219 4.3150 4.7385 5.7165
>
> Columns 113 through 120
>
> 5.9830 4.5340 4.8386 5.4975 6.2997 5.2499 5.9044 5.7943
>
> Columns 121 through 128
>
> 4.9780 4.4897 4.0719 4.7018 4.9238 6.5815 5.2562 6.7237
>
> Columns 129 through 136
>
> 6.7677 4.8205 6.0458 6.2771 6.0010 5.0315 5.5009 5.2919
>
> Columns 137 through 144
>
> 5.5077 4.7538 6.1837 6.3484 4.7778 6.6374 5.2317 4.8860
>
> Columns 145 through 152
>
> 4.9719 5.3880 5.3152 5.8270 5.1045 6.0504 5.4374 3.7814
>
> Columns 153 through 160
>
> 5.0452 5.2118 4.9397 4.8238 5.4505 4.9794 5.6053 6.0955
>
> Columns 161 through 168
>
> 5.5155 4.3920 5.6489 6.0388 5.5931 5.5656 5.7943 5.6810
>
> Columns 169 through 176
>
> 4.7083 4.3224 5.2673 4.8004 5.2950 5.1206 4.9927 5.4213
>
> Columns 177 through 184
>
> 5.2880 6.3977 6.2130 5.2446 4.6313 5.4773 5.4737 5.8060
>
> Columns 185 through 192
>
> 5.6917 6.0580 5.5691 5.6781 5.8385 5.1914 5.8142 5.4956
>
> Columns 193 through 200
>
> 5.7248 5.7405 5.9182 6.0607 5.4018 5.0438 5.3680 5.2771
>
> Columns 201 through 208
>
> 4.8404 5.3044 6.5197 6.4447 6.3491 6.1631 5.4550 5.7196
>
> Columns 209 through 216
>
> 6.2017 5.5387 4.9662 4.8044 6.0276 4.3281 5.6601 5.7215
>
> Columns 217 through 224
>
> 5.1911 5.7552 6.5644 6.0831 5.4770 5.3370 5.0382 4.6131
>
> Columns 225 through 232
>
> 5.0674 5.7593 5.0113 5.1661 4.9419 5.9853 4.6350 5.4414
>
> Columns 233 through 240
>
> 5.5064 5.6572 5.5351 5.2374 4.9883 4.9589 6.0502 4.7998
>
> Columns 241 through 248
>
> 5.3144 6.2188 4.9655 4.6587 5.2346 5.4555 4.8066 5.4501
>
> Columns 249 through 256
>
> 5.3598 5.8693 4.5100 6.0507 6.0774 5.7986 6.3140 6.0363
>
> Columns 257 through 264
>
> 5.9949 5.9914 6.3033 5.3806 4.8013 5.7817 4.7125 4.4363
>
> Columns 265 through 272
>
> 4.9725 5.2954 4.9869 4.8581 5.0924 6.0504 4.3920 5.2946
>
> Columns 273 through 280
>
> 5.5244 4.9525 5.2133 4.6177 4.7012 4.6775 4.4400 5.4291
>
> Columns 281 through 288
>
> 6.1691 5.7412 5.3969 5.4018 4.6190 5.0996 4.8630 4.6550
>
> Columns 289 through 296
>
> 5.5693 5.2026 5.1053 5.2995 4.3205 4.8444 4.4920 5.3043
>
> Columns 297 through 304
>
> 4.7757 4.9652 5.1068 4.2532 4.7127 5.8318 4.9308 4.8028
>
> Columns 305 through 312
>
> 5.1926 5.2626 5.1408 4.4399 5.0079 5.5684 6.2719 4.7623
>
> Columns 313 through 320
>
> 4.8319 5.7775 5.2189 5.2956 4.8078 5.2888 5.4223 5.1529
>
> Columns 321 through 328
>
> 5.2689 5.6748 4.8849 5.4042 5.3555 5.2510 5.1365 4.7795
>
> Columns 329 through 336
>
> 5.4509 5.4546 4.8362 4.5989 5.3091 4.6740 5.5470 5.4161
>
> Columns 337 through 344
>
> 5.9327 5.2244 5.4093 5.6110 5.4324 5.3683 4.8545 4.7428
>
> Columns 345 through 352
>
> 5.0910 4.6178 5.0860 5.1417 5.0786 5.1926 5.9070 4.9935
>
> Columns 353 through 360
>
> 5.4601 5.2726 5.0257 5.0903 5.7919 4.6664 5.1237 5.0481
>
> these are not according to the desired target.



Thank you so much for your reply.i dont get the part where u mentioned if o =1 and o=10.i will apply these changes to the code.

Subject: problem with testing newff

From: faiza khan

Date: 26 Jun, 2012 16:03:06

Message: 4 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <js955i$q2q$1@newscl01ah.mathworks.com>...
> hello
> im faiza..im doing my project on speech recognition. i have used newff and trainrp for my network.it is trained correctly.i tested it using sim(net,input) function.the output it give is weird.i dont understand it.please can u help me. the data given to newff is collected from 36 people.they uttered first 10 digits of pashto language.data has 360 rows and 12 columns.its transpose given to sim. here's the code
> function [net] = nn(input)
> inputs = input;
> A = [1 ; 2; 3 ; 4 ;5 ; 6 ; 7 ; 8 ;9 ; 10 ];
> target = repmat(A,36,1);
> net = newff(inputs',target',12);
> net = initnw(net,1);
> net.layers{1}.transferFcn = 'logsig';
> net.layers{2}.transferFcn = 'tansig';
> net.trainParam.epochs=50;
> net.trainFcn = 'trainrp';
> net = train(net,inputs',target');
> end
>
>
> the code for testing is
> function [out1] = testing(net,inp)
> input = (inp)';
> out1 = sim(net,input);
> end
>
>
> the output it gives is
> Columns 1 through 8
>
> 5.8730 4.9237 5.2588 4.4363 6.1004 4.4851 6.0459 6.6004
>
> Columns 9 through 16
>
> 5.8423 6.0784 5.0081 5.0340 4.5923 6.5285 4.9167 6.3681
>
> Columns 17 through 24
>
> 5.4162 6.1277 5.8132 5.7455 4.4250 5.5688 5.3741 4.4044
>
> Columns 25 through 32
>
> 4.8240 5.1328 5.4030 4.4187 4.8750 6.2385 4.9825 3.9851
>
> Columns 33 through 40
>
> 5.7125 4.4337 5.6709 5.7152 4.8082 5.2324 5.4639 5.0443
>
> Columns 41 through 48
>
> 4.0132 5.8979 5.5714 5.5867 4.6752 6.1313 5.4412 4.7076
>
> Columns 49 through 56
>
> 5.8082 5.9257 5.4939 5.0700 5.4370 3.5233 5.8292 5.6772
>
> Columns 57 through 64
>
> 4.3685 4.7711 6.1782 5.1509 5.3406 4.8770 4.7628 4.8407
>
> Columns 65 through 72
>
> 5.5492 6.1534 3.5791 4.0879 3.6750 5.9533 4.4291 4.2794
>
> Columns 73 through 80
>
> 4.9108 5.9751 4.6258 4.5095 6.4539 5.3825 6.4861 6.5007
>
> Columns 81 through 88
>
> 4.3931 5.5831 5.6546 5.5105 5.7171 4.6844 4.4875 5.1583
>
> Columns 89 through 96
>
> 6.5685 5.7780 4.8688 5.9912 6.8957 6.1530 5.9038 6.1321
>
> Columns 97 through 104
>
> 5.6081 6.0981 5.8423 5.9656 4.9657 3.9337 5.2042 5.0709
>
> Columns 105 through 112
>
> 4.8548 5.6243 4.5042 6.0932 5.3219 4.3150 4.7385 5.7165
>
> Columns 113 through 120
>
> 5.9830 4.5340 4.8386 5.4975 6.2997 5.2499 5.9044 5.7943
>
> Columns 121 through 128
>
> 4.9780 4.4897 4.0719 4.7018 4.9238 6.5815 5.2562 6.7237
>
> Columns 129 through 136
>
> 6.7677 4.8205 6.0458 6.2771 6.0010 5.0315 5.5009 5.2919
>
> Columns 137 through 144
>
> 5.5077 4.7538 6.1837 6.3484 4.7778 6.6374 5.2317 4.8860
>
> Columns 145 through 152
>
> 4.9719 5.3880 5.3152 5.8270 5.1045 6.0504 5.4374 3.7814
>
> Columns 153 through 160
>
> 5.0452 5.2118 4.9397 4.8238 5.4505 4.9794 5.6053 6.0955
>
> Columns 161 through 168
>
> 5.5155 4.3920 5.6489 6.0388 5.5931 5.5656 5.7943 5.6810
>
> Columns 169 through 176
>
> 4.7083 4.3224 5.2673 4.8004 5.2950 5.1206 4.9927 5.4213
>
> Columns 177 through 184
>
> 5.2880 6.3977 6.2130 5.2446 4.6313 5.4773 5.4737 5.8060
>
> Columns 185 through 192
>
> 5.6917 6.0580 5.5691 5.6781 5.8385 5.1914 5.8142 5.4956
>
> Columns 193 through 200
>
> 5.7248 5.7405 5.9182 6.0607 5.4018 5.0438 5.3680 5.2771
>
> Columns 201 through 208
>
> 4.8404 5.3044 6.5197 6.4447 6.3491 6.1631 5.4550 5.7196
>
> Columns 209 through 216
>
> 6.2017 5.5387 4.9662 4.8044 6.0276 4.3281 5.6601 5.7215
>
> Columns 217 through 224
>
> 5.1911 5.7552 6.5644 6.0831 5.4770 5.3370 5.0382 4.6131
>
> Columns 225 through 232
>
> 5.0674 5.7593 5.0113 5.1661 4.9419 5.9853 4.6350 5.4414
>
> Columns 233 through 240
>
> 5.5064 5.6572 5.5351 5.2374 4.9883 4.9589 6.0502 4.7998
>
> Columns 241 through 248
>
> 5.3144 6.2188 4.9655 4.6587 5.2346 5.4555 4.8066 5.4501
>
> Columns 249 through 256
>
> 5.3598 5.8693 4.5100 6.0507 6.0774 5.7986 6.3140 6.0363
>
> Columns 257 through 264
>
> 5.9949 5.9914 6.3033 5.3806 4.8013 5.7817 4.7125 4.4363
>
> Columns 265 through 272
>
> 4.9725 5.2954 4.9869 4.8581 5.0924 6.0504 4.3920 5.2946
>
> Columns 273 through 280
>
> 5.5244 4.9525 5.2133 4.6177 4.7012 4.6775 4.4400 5.4291
>
> Columns 281 through 288
>
> 6.1691 5.7412 5.3969 5.4018 4.6190 5.0996 4.8630 4.6550
>
> Columns 289 through 296
>
> 5.5693 5.2026 5.1053 5.2995 4.3205 4.8444 4.4920 5.3043
>
> Columns 297 through 304
>
> 4.7757 4.9652 5.1068 4.2532 4.7127 5.8318 4.9308 4.8028
>
> Columns 305 through 312
>
> 5.1926 5.2626 5.1408 4.4399 5.0079 5.5684 6.2719 4.7623
>
> Columns 313 through 320
>
> 4.8319 5.7775 5.2189 5.2956 4.8078 5.2888 5.4223 5.1529
>
> Columns 321 through 328
>
> 5.2689 5.6748 4.8849 5.4042 5.3555 5.2510 5.1365 4.7795
>
> Columns 329 through 336
>
> 5.4509 5.4546 4.8362 4.5989 5.3091 4.6740 5.5470 5.4161
>
> Columns 337 through 344
>
> 5.9327 5.2244 5.4093 5.6110 5.4324 5.3683 4.8545 4.7428
>
> Columns 345 through 352
>
> 5.0910 4.6178 5.0860 5.1417 5.0786 5.1926 5.9070 4.9935
>
> Columns 353 through 360
>
> 5.4601 5.2726 5.0257 5.0903 5.7919 4.6664 5.1237 5.0481
>
> these are not according to the desired target.
 Thank you so much for your reply.but i dont understand the part where u mentioned if o =1 and o=10.i will apply these changes to my code.

Subject: problem with testing newff

From: faiza khan

Date: 26 Jun, 2012 16:26:06

Message: 5 of 11

i tried ur code, when i simulate the network.it gives the exact targets as output.

Subject: problem with testing newff

From: Greg Heath

Date: 26 Jun, 2012 19:06:09

Message: 6 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <jscmfq$pqq$1@newscl01ah.mathworks.com>...
> "faiza khan" <faizakhan797@gmail.com> wrote in message <js955i$q2q$1@newscl01ah.mathworks.com>...
-----SNIP
> > 5.4601 5.2726 5.0257 5.0903 5.7919 4.6664 5.1237 5.0481
> >
> > these are not according to the desired target.

Impossible if the output activation unit is tansig!

> Thank you so much for your reply.but i dont understand the part where u mentioned if o =1 and o=10.i will apply these changes to my code.

I use I for input, H for hidden, O for output.

Your output coding with class indices yelds O = 1

My output coding with ind2vec yields O = 10 with the output aproximating the
input conditional class posterior probability.

Hope this helps.

Greg

Subject: problem with testing newff

From: Greg Heath

Date: 26 Jun, 2012 19:11:06

Message: 7 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <jscnqu$2nu$1@newscl01ah.mathworks.com>...
> i tried ur code, when i simulate the network.it gives the exact targets as output.

Good.

Next time use Heath instead of Health

Greg

Subject: problem with testing newff

From: faiza khan

Date: 27 Jun, 2012 06:53:07

Message: 8 of 11

"Greg Heath" <heath@alumni.brown.edu> wrote in message <jsd1ga$i71$1@newscl01ah.mathworks.com>...
> "faiza khan" <faizakhan797@gmail.com> wrote in message <jscnqu$2nu$1@newscl01ah.mathworks.com>...
> > i tried ur code, when i simulate the network.it gives the exact targets as output.
>
> Good.
>
> Next time use Heath instead of Health
>
> Greg
hello
and ya sorry about the name ..
inputs = inp';
 
%target=ind2vec(classes);
net = newff(inputs,target,24);
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn='logsig';
net.trainFcn = 'trainrp';
net = train(net,inputs,target);
end
it gives this output
    (1,1) 0.5000
   (2,1) 0.5000
   (3,1) 0.5000
   (4,1) 0.5000
   (5,1) 0.5000
   (6,1) 0.5000
   (7,1) 0.5000
   (8,1) 0.5000
   (9,1) 0.5000
  (10,1) 0.5000
   (1,2) 0.5000
   (2,2) 0.5000
   (3,2) 0.5000
   (4,2) 0.5000
   (5,2) 0.5000
   (6,2) 0.5000
   (7,2) 0.5000
   (8,2) 0.5000
   (9,2) 0.5000
  (10,2) 0.5000
   (1,3) 0.5000
   (2,3) 0.5000
   (3,3) 0.5000
   (4,3) 0.5000
   (5,3) 0.5000
   (6,3) 0.5000
   (7,3) 0.5000
   (8,3) 0.5000
   (9,3) 0.5000
  (10,3) 0.5000
   (1,4) 0.5000
   (2,4) 0.5000
   (3,4) 0.5000
   (4,4) 0.5000
   (5,4) 0.5000
   (6,4) 0.5000
   (7,4) 0.5000
   (8,4) 0.5000
   (9,4) 0.5000
  (10,4) 0.5000
   (1,5) 0.5000
   (2,5) 0.5000
   (3,5) 0.5000
   (4,5) 0.5000
   (5,5) 0.5000
   (6,5) 0.5000
   (7,5) 0.5000
   (8,5) 0.5000
   (9,5) 0.5000
  (10,5) 0.5000
upto
(10,360) 0.5000
please help me solve this problem. it wont train.

Subject: problem with testing newff

From: Greg Heath

Date: 27 Jun, 2012 18:34:08

Message: 9 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <jseakj$36n$1@newscl01ah.mathworks.com>...
> "Greg Heath" <heath@alumni.brown.edu> wrote in message <jsd1ga$i71$1@newscl01ah.mathworks.com>...
> > "faiza khan" <faizakhan797@gmail.com> wrote in message <jscnqu$2nu$1@newscl01ah.mathworks.com>...
> > > i tried ur code, when i simulate the network.it gives the exact targets as output.
> >
> > Good.
> >
> > Next time use Heath instead of Health
> >
> > Greg
> hello
> and ya sorry about the name ..
> inputs = inp';
>
> %target=ind2vec(classes);

Why commented out ?

> net = newff(inputs,target,24);

What is target ?
Why H = 24 ?
> net.layers{1}.transferFcn = 'tansig';
> net.layers{2}.transferFcn='logsig';
> net.trainFcn = 'trainrp';
> net = train(net,inputs,target);
> end

end of what?

> it gives this output

Why are you excluding code and including a lot of ridiculous numbers ?

> (1,1) 0.5000
---SNIP
> upto
> (10,360) 0.5000
> please help me solve this problem. it wont train.

You said you had the code working.

Wha Hoppen?

Include all code and error messages.

Do not include a useless column of outputs.

Hope this helps.

Greg

Subject: problem with testing newff

From: faiza khan

Date: 27 Jun, 2012 20:35:10

Message: 10 of 11

"Greg Heath" <heath@alumni.brown.edu> wrote in message <jsfjn0$4s$1@newscl01ah.mathworks.com>...
> "faiza khan" <faizakhan797@gmail.com> wrote in message <jseakj$36n$1@newscl01ah.mathworks.com>...
> > "Greg Heath" <heath@alumni.brown.edu> wrote in message <jsd1ga$i71$1@newscl01ah.mathworks.com>...
> > > "faiza khan" <faizakhan797@gmail.com> wrote in message <jscnqu$2nu$1@newscl01ah.mathworks.com>...
> > > > i tried ur code, when i simulate the network.it gives the exact targets as output.
> > >
> > > Good.
> > >
> > > Next time use Heath instead of Health
> > >
> > > Greg
> > hello
> > and ya sorry about the name ..
> > inputs = inp';
> >
> > %target=ind2vec(classes);
>
> Why commented out ?
>
> > net = newff(inputs,target,24);
>
> What is target ?
> Why H = 24 ?
> > net.layers{1}.transferFcn = 'tansig';
> > net.layers{2}.transferFcn='logsig';
> > net.trainFcn = 'trainrp';
> > net = train(net,inputs,target);
> > end
>
> end of what?
>
> > it gives this output
>
> Why are you excluding code and including a lot of ridiculous numbers ?
>
> > (1,1) 0.5000
> ---SNIP
> > upto
> > (10,360) 0.5000
> > please help me solve this problem. it wont train.
>
> You said you had the code working.
>
> Wha Hoppen?
>
> Include all code and error messages.
>
> Do not include a useless column of outputs.
>
> Hope this helps.
>
> Greg

hello
there are no errors in the code. when i run the code neural network starts training and stop right away without going through any epochs.and gives the target matrix as output.it does not even train.
i have first taken FFT of my speech data.then applied the melcepst function.and at last training. i dont know where i have left something. the speech data of two different people having uttered the same word is quite different.it should match somewhat right?
Thanks

Subject: problem with testing newff

From: Greg Heath

Date: 28 Jun, 2012 00:40:12

Message: 11 of 11

"faiza khan" <faizakhan797@gmail.com> wrote in message <jsfqpu$3el$1@newscl01ah.mathworks.com>...
> "Greg Heath" <heath@alumni.brown.edu> wrote in message <jsfjn0$4s$1@newscl01ah.mathworks.com>...
> > "faiza khan" <faizakhan797@gmail.com> wrote in message <jseakj$36n$1@newscl01ah.mathworks.com>...
> > > "Greg Heath" <heath@alumni.brown.edu> wrote in message <jsd1ga$i71$1@newscl01ah.mathworks.com>...
> > > > "faiza khan" <faizakhan797@gmail.com> wrote in message <jscnqu$2nu$1@newscl01ah.mathworks.com>...

You neither answered my questions nor included code and abbreviated output.

?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
greg heath faiza khan 27 Jun, 2012 02:54:10
greg health faiza khan 26 Jun, 2012 11:59:12
matlab greg health faiza khan 25 Jun, 2012 03:49:12
rssFeed for this Thread

Contact us