[R] neural net
dada
paxkn at nottingham.ac.uk
Thu Dec 13 12:33:33 CET 2012
Thanks for your reply. I have compared my data with some other which works
and I cannot see the difference...
The structure of my data is shown below:
> str(data)
'data.frame': 19 obs. of 7 variables:
$ drug : Factor w/ 19 levels "A","B","C","D",..: 1 2 3 4 5 6 7 8 9 10
...
$ param1 : int 111 347 335 477 863 737 390 209 376 262 ...
$ param2 : int 15 13 9 37 24 28 63 93 72 16 ...
$ param3 : int 125 280 119 75 180 150 167 200 201 205 ...
$ param4 : int 40 55 89 2 10 15 12 48 45 49 ...
$ param5 : num 0.5 3 -40 0 5 6 0 45 -60 25 ...
$ Class : int 1 2 1 1 2 2 3 3 3 3 ...
> summary(data)
drug param1 param2 param3 param4
param5 Class
A : 1 Min. :111.0 Min. : 2.0 Min. : 75.0 Min. :-20.00
Min. :-60.000 Min. :1.000
B : 1 1st Qu.:253.5 1st Qu.:15.0 1st Qu.:132.5 1st Qu.: 12.00
1st Qu.: 0.000 1st Qu.:1.000
C : 1 Median :335.0 Median :28.0 Median :164.0 Median : 40.00
Median : 6.000 Median :2.000
D : 1 Mean :383.0 Mean :33.0 Mean :166.0 Mean : 35.26
Mean : 4.447 Mean :1.895
E : 1 3rd Qu.:433.5 3rd Qu.:42.5 3rd Qu.:200.5 3rd Qu.: 54.00
3rd Qu.: 20.500 3rd Qu.:2.000
F : 1 Max. :863.0 Max. :93.0 Max. :280.0 Max. : 89.00
Max. : 45.000 Max. :3.000
(Other):13
The structure of the example data which worked is shown below:
> str(infert)
'data.frame': 248 obs. of 8 variables:
$ education : Factor w/ 3 levels "0-5yrs","6-11yrs",..: 1 1 1 1 2 2 2 2
2 2 ...
$ age : num 26 42 39 34 35 36 23 32 21 28 ...
$ parity : num 6 1 6 4 3 4 1 2 1 2 ...
$ induced : num 1 1 2 2 1 2 0 0 0 0 ...
$ case : num 1 1 1 1 1 1 1 1 1 1 ...
$ spontaneous : num 2 0 0 0 1 1 0 0 1 0 ...
$ stratum : int 1 2 3 4 5 6 7 8 9 10 ...
$ pooled.stratum: num 3 1 4 2 32 36 6 22 5 19 ...
> summary(infert)
education age parity induced case
spontaneous stratum pooled.stratum
0-5yrs : 12 Min. :21.00 Min. :1.000 Min. :0.0000 Min.
:0.0000 Min. :0.0000 Min. : 1.00 Min. : 1.00
6-11yrs:120 1st Qu.:28.00 1st Qu.:1.000 1st Qu.:0.0000 1st
Qu.:0.0000 1st Qu.:0.0000 1st Qu.:21.00 1st Qu.:19.00
12+ yrs:116 Median :31.00 Median :2.000 Median :0.0000 Median
:0.0000 Median :0.0000 Median :42.00 Median :36.00
Mean :31.50 Mean :2.093 Mean :0.5726 Mean
:0.3347 Mean :0.5766 Mean :41.87 Mean :33.58
3rd Qu.:35.25 3rd Qu.:3.000 3rd Qu.:1.0000 3rd
Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.:62.25 3rd Qu.:48.25
Max. :44.00 Max. :6.000 Max. :2.0000 Max.
:1.0000 Max. :2.0000 Max. :83.00 Max. :63.00
So still not sure how to solve the problem ....
--
View this message in context: http://r.789695.n4.nabble.com/neural-net-tp4652927p4652984.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list