Main Page | Report this Page
Computers Forum Index  »  Computer Artificial Intelligence - Neural Nets  »  Please help to train a NN...
Page 1 of 1    

Please help to train a NN...

Author Message
Lena Schüssler...
Posted: Mon Aug 24, 2009 9:13 am
Guest
I have a small NN library for multilayer perceptron. It works fine on
classification problems, but when i try to train it on one simple data
set with 2 inputs in order to approximate function sin(a)+cos(b) the
error doesn't reduce.
If somebody of you could try to train NN on this dataset and tell me
if this task is appropriate for such type of networks or not i would
appreciate it Smile
I just want to know if something is wrong with my network as i
programmed it myself or if this task is not for the network.
So here is the dataset
3.140000 0.015700 1.001469
4.580000 0.015700 0.008627
6.020000 0.015700 0.739719
4.430000 0.015700 0.039484
3.060000 0.015700 1.081379
0.640000 0.015700 1.597072
4.480000 0.015700 0.026758
5.470000 0.015700 0.273397
2.150000 0.015700 1.836776
0.430000 0.015700 1.416748
4.360000 0.015700 0.061326
4.800000 0.015700 0.003712
4.870000 0.015700 0.012272
1.200000 0.015700 1.931916
1.850000 0.015700 1.961152
1.870000 0.015700 1.955448
2.080000 0.015700 1.873010
1.780000 0.015700 1.978073
2.620000 0.015700 1.498139
0.650000 0.015700 1.605063
0.140000 0.015700 1.139420
0.650000 0.015700 1.605063
2.260000 0.015700 1.771629
5.050000 0.015700 0.056328
4.930000 0.015700 0.023461
1.730000 0.015700 1.987231
0.420000 0.015700 1.407637
5.220000 0.015700 0.125968
4.370000 0.015700 0.057922
2.610000 0.015700 1.506784
3.190000 0.015700 0.951488
1.230000 0.015700 1.942366
0.910000 0.015700 1.789381
2.930000 0.015700 1.209894
5.980000 0.015700 0.701315
3.970000 0.015700 0.263021
3.900000 0.015700 0.312111
4.180000 0.015700 0.138280
3.480000 0.015700 0.667892
0.090000 0.015700 1.089755
4.610000 0.015700 0.005114
1.880000 0.015700 1.952453
5.210000 0.015700 0.121151
3.520000 0.015700 0.630436
3.080000 0.015700 1.061431
0.780000 0.015700 1.703156
5.720000 0.015700 0.465994
5.170000 0.015700 0.102766
2.880000 0.015700 1.258496
2.380000 0.015700 1.689952
6.140000 0.031400 0.856810
3.030000 0.031400 1.110868
3.040000 0.031400 1.100925
2.120000 0.031400 1.852448
2.120000 0.031400 1.852448
2.010000 0.031400 1.904598
3.850000 0.031400 0.348882
2.870000 0.031400 1.267773
0.960000 0.031400 1.818699
2.260000 0.031400 1.771260
5.480000 0.031400 0.279935
4.470000 0.031400 0.028740
3.820000 0.031400 0.371953
0.430000 0.031400 1.416378
1.440000 0.031400 1.990965
3.840000 0.031400 0.356508
4.720000 0.031400 -0.000464
5.340000 0.031400 0.190074
1.750000 0.031400 1.983493
1.930000 0.031400 1.935684
5.430000 0.031400 0.246128
0.400000 0.031400 1.388925
3.810000 0.031400 0.379770
4.360000 0.031400 0.060956
4.250000 0.031400 0.104518
0.940000 0.031400 1.807065
5.460000 0.031400 0.266192
4.010000 0.031400 0.236206
6.110000 0.031400 0.827186
2.390000 0.031400 1.682310
0.110000 0.031400 1.109285
5.970000 0.031400 0.691416
5.740000 0.031400 0.482641
3.150000 0.031400 0.991100
2.130000 0.031400 1.847185
1.580000 0.031400 1.999465
5.490000 0.031400 0.286915
5.980000 0.031400 0.700945
4.450000 0.031400 0.033734
0.170000 0.031400 1.168689
2.290000 0.031400 1.751838
3.970000 0.031400 0.262651
4.640000 0.031400 0.002126
6.110000 0.031400 0.827186
4.720000 0.031400 -0.000464
6.080000 0.031400 0.797717
3.670000 0.031400 0.495348
3.170000 0.031400 0.971103
5.470000 0.031400 0.273027
5.740000 0.031400 0.482641

here 1-st column is "a" and second column is "b", third column is the
output.
Thank you and greetings,
leen
 
Thorsten Kiefer...
Posted: Mon Aug 24, 2009 11:09 pm
Guest
Hi,
what is the activation function of the output neuron ?
The output column of your training set is outside the range [-1..1].
Maybe that is part of the problem.

Regards
Thorsten


Lena Schüssler wrote:

Quote:
I have a small NN library for multilayer perceptron. It works fine on
classification problems, but when i try to train it on one simple data
set with 2 inputs in order to approximate function sin(a)+cos(b) the
error doesn't reduce.
If somebody of you could try to train NN on this dataset and tell me
if this task is appropriate for such type of networks or not i would
appreciate it Smile
I just want to know if something is wrong with my network as i
programmed it myself or if this task is not for the network.
So here is the dataset
3.140000 0.015700 1.001469
4.580000 0.015700 0.008627
6.020000 0.015700 0.739719
4.430000 0.015700 0.039484
3.060000 0.015700 1.081379
0.640000 0.015700 1.597072
4.480000 0.015700 0.026758
5.470000 0.015700 0.273397
2.150000 0.015700 1.836776
0.430000 0.015700 1.416748
4.360000 0.015700 0.061326
4.800000 0.015700 0.003712
4.870000 0.015700 0.012272
1.200000 0.015700 1.931916
1.850000 0.015700 1.961152
1.870000 0.015700 1.955448
2.080000 0.015700 1.873010
1.780000 0.015700 1.978073
2.620000 0.015700 1.498139
0.650000 0.015700 1.605063
0.140000 0.015700 1.139420
0.650000 0.015700 1.605063
2.260000 0.015700 1.771629
5.050000 0.015700 0.056328
4.930000 0.015700 0.023461
1.730000 0.015700 1.987231
0.420000 0.015700 1.407637
5.220000 0.015700 0.125968
4.370000 0.015700 0.057922
2.610000 0.015700 1.506784
3.190000 0.015700 0.951488
1.230000 0.015700 1.942366
0.910000 0.015700 1.789381
2.930000 0.015700 1.209894
5.980000 0.015700 0.701315
3.970000 0.015700 0.263021
3.900000 0.015700 0.312111
4.180000 0.015700 0.138280
3.480000 0.015700 0.667892
0.090000 0.015700 1.089755
4.610000 0.015700 0.005114
1.880000 0.015700 1.952453
5.210000 0.015700 0.121151
3.520000 0.015700 0.630436
3.080000 0.015700 1.061431
0.780000 0.015700 1.703156
5.720000 0.015700 0.465994
5.170000 0.015700 0.102766
2.880000 0.015700 1.258496
2.380000 0.015700 1.689952
6.140000 0.031400 0.856810
3.030000 0.031400 1.110868
3.040000 0.031400 1.100925
2.120000 0.031400 1.852448
2.120000 0.031400 1.852448
2.010000 0.031400 1.904598
3.850000 0.031400 0.348882
2.870000 0.031400 1.267773
0.960000 0.031400 1.818699
2.260000 0.031400 1.771260
5.480000 0.031400 0.279935
4.470000 0.031400 0.028740
3.820000 0.031400 0.371953
0.430000 0.031400 1.416378
1.440000 0.031400 1.990965
3.840000 0.031400 0.356508
4.720000 0.031400 -0.000464
5.340000 0.031400 0.190074
1.750000 0.031400 1.983493
1.930000 0.031400 1.935684
5.430000 0.031400 0.246128
0.400000 0.031400 1.388925
3.810000 0.031400 0.379770
4.360000 0.031400 0.060956
4.250000 0.031400 0.104518
0.940000 0.031400 1.807065
5.460000 0.031400 0.266192
4.010000 0.031400 0.236206
6.110000 0.031400 0.827186
2.390000 0.031400 1.682310
0.110000 0.031400 1.109285
5.970000 0.031400 0.691416
5.740000 0.031400 0.482641
3.150000 0.031400 0.991100
2.130000 0.031400 1.847185
1.580000 0.031400 1.999465
5.490000 0.031400 0.286915
5.980000 0.031400 0.700945
4.450000 0.031400 0.033734
0.170000 0.031400 1.168689
2.290000 0.031400 1.751838
3.970000 0.031400 0.262651
4.640000 0.031400 0.002126
6.110000 0.031400 0.827186
4.720000 0.031400 -0.000464
6.080000 0.031400 0.797717
3.670000 0.031400 0.495348
3.170000 0.031400 0.971103
5.470000 0.031400 0.273027
5.740000 0.031400 0.482641

here 1-st column is "a" and second column is "b", third column is the
output.
Thank you and greetings,
leen
 
gzibret...
Posted: Wed Sep 30, 2009 8:13 am
Guest
On 24 avg., 21:09, Thorsten Kiefer <tok... at (no spam) gmx.net> wrote:
Quote:
Hi,
what is the activation function of the output neuron ?
The output column of your training set is outside the range [-1..1].
Maybe that is part of the problem.

Regards
Thorsten



Lena Schüssler wrote:
I have a small NN library for multilayer perceptron. It works fine on
classification problems, but when i try to train it on one simple data
set with 2 inputs in order to approximate function sin(a)+cos(b) the
error doesn't reduce.
If somebody of you could try to train NN on this dataset and tell me
if this task is appropriate for such type of networks or not i would
appreciate it Smile
I just want to know if something is wrong with my network as i
programmed it myself or if this task is not for the network.
So here is the dataset
3.140000 0.015700 1.001469
4.580000 0.015700 0.008627
6.020000 0.015700 0.739719
4.430000 0.015700 0.039484
3.060000 0.015700 1.081379
0.640000 0.015700 1.597072
4.480000 0.015700 0.026758
5.470000 0.015700 0.273397
2.150000 0.015700 1.836776
0.430000 0.015700 1.416748
4.360000 0.015700 0.061326
4.800000 0.015700 0.003712
4.870000 0.015700 0.012272
1.200000 0.015700 1.931916
1.850000 0.015700 1.961152
1.870000 0.015700 1.955448
2.080000 0.015700 1.873010
1.780000 0.015700 1.978073
2.620000 0.015700 1.498139
0.650000 0.015700 1.605063
0.140000 0.015700 1.139420
0.650000 0.015700 1.605063
2.260000 0.015700 1.771629
5.050000 0.015700 0.056328
4.930000 0.015700 0.023461
1.730000 0.015700 1.987231
0.420000 0.015700 1.407637
5.220000 0.015700 0.125968
4.370000 0.015700 0.057922
2.610000 0.015700 1.506784
3.190000 0.015700 0.951488
1.230000 0.015700 1.942366
0.910000 0.015700 1.789381
2.930000 0.015700 1.209894
5.980000 0.015700 0.701315
3.970000 0.015700 0.263021
3.900000 0.015700 0.312111
4.180000 0.015700 0.138280
3.480000 0.015700 0.667892
0.090000 0.015700 1.089755
4.610000 0.015700 0.005114
1.880000 0.015700 1.952453
5.210000 0.015700 0.121151
3.520000 0.015700 0.630436
3.080000 0.015700 1.061431
0.780000 0.015700 1.703156
5.720000 0.015700 0.465994
5.170000 0.015700 0.102766
2.880000 0.015700 1.258496
2.380000 0.015700 1.689952
6.140000 0.031400 0.856810
3.030000 0.031400 1.110868
3.040000 0.031400 1.100925
2.120000 0.031400 1.852448
2.120000 0.031400 1.852448
2.010000 0.031400 1.904598
3.850000 0.031400 0.348882
2.870000 0.031400 1.267773
0.960000 0.031400 1.818699
2.260000 0.031400 1.771260
5.480000 0.031400 0.279935
4.470000 0.031400 0.028740
3.820000 0.031400 0.371953
0.430000 0.031400 1.416378
1.440000 0.031400 1.990965
3.840000 0.031400 0.356508
4.720000 0.031400 -0.000464
5.340000 0.031400 0.190074
1.750000 0.031400 1.983493
1.930000 0.031400 1.935684
5.430000 0.031400 0.246128
0.400000 0.031400 1.388925
3.810000 0.031400 0.379770
4.360000 0.031400 0.060956
4.250000 0.031400 0.104518
0.940000 0.031400 1.807065
5.460000 0.031400 0.266192
4.010000 0.031400 0.236206
6.110000 0.031400 0.827186
2.390000 0.031400 1.682310
0.110000 0.031400 1.109285
5.970000 0.031400 0.691416
5.740000 0.031400 0.482641
3.150000 0.031400 0.991100
2.130000 0.031400 1.847185
1.580000 0.031400 1.999465
5.490000 0.031400 0.286915
5.980000 0.031400 0.700945
4.450000 0.031400 0.033734
0.170000 0.031400 1.168689
2.290000 0.031400 1.751838
3.970000 0.031400 0.262651
4.640000 0.031400 0.002126
6.110000 0.031400 0.827186
4.720000 0.031400 -0.000464
6.080000 0.031400 0.797717
3.670000 0.031400 0.495348
3.170000 0.031400 0.971103
5.470000 0.031400 0.273027
5.740000 0.031400 0.482641

here 1-st column is "a" and second column is "b", third column is the
output.
Thank you and greetings,
leen- Skrij navedeno besedilo -

- Prikaži citirano besedilo -

Normalize all variables to the interval [0, 1] in case of sigmoidal
act. function or to the interval [-1,+1] in the case zou use tanhyp
activation function.

That's it

Gorazd
 
Phil Sherrod...
Posted: Thu Oct 01, 2009 4:00 am
Guest
On 24-Aug-2009, =?ISO-8859-1?Q?Lena_Sch=FCssler?=
<lena.schuessler at (no spam) gmail.com> wrote:

Quote:
I have a small NN library for multilayer perceptron. It works fine on
classification problems, but when i try to train it on one simple data
set with 2 inputs in order to approximate function sin(a)+cos(b) the
error doesn't reduce.
If somebody of you could try to train NN on this dataset and tell me
if this task is appropriate for such type of networks or not i would
appreciate it Smile
I just want to know if something is wrong with my network as i
programmed it myself or if this task is not for the network.
So here is the dataset
[snip]


I had no problem fitting a NN to your data. I used a single (hidden) layer
NN with logistic activation functions in the hidden layer and a linear
output activation function.

# neurons % variance explained with 10-fold cross validation
--------------
-----------------------------------------------------------------------
1 87.615%
2 98.550%
5 99.372%
10 99.732%
20 99.982%
32 99.986%

There is very little variance in your 'b' variable, so it contributed little
to the model:

============ Overall Importance of Variables ============

Variable Importance
-------- ----------
A 100.000
B 0.006

It took about 1 second for DTREG to fit a NN with 20 hidden neurons to your
data and do 10-fold cross validation.

--
Phil Sherrod
http://www.dtreg.com -- Neural networks, SVM, Decision trees
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Dec 01, 2009 7:17 am