[R] neural net

dada paxkn at nottingham.ac.uk
Thu Dec 13 00:41:14 CET 2012


Hi 
I would like to do neural netowrk analysis on my data. It look like this:

drug	param1	param2	param3	param4	param5	class
A	111	15	125	40	0.5	1
B	347	13	280	55	3	2
C	335	9	119	89	-40	1
D	477	37	75	2	0	1
E	863	24	180	10	5	2
F	737	28	150	15	6	2
G	390	63	167	12	0	3
H	209	93	200	48	45	3
I	376	72	201	45	-60	3
J 	262	16	205	49	25	3
K	273	39	267	53	11	1
L	192	33	164	19	15	2
M	282	2	213	86	30	1
N	111	11	198	68	-21	1
O	387	20	143	12	16	2
P	674	15	78	-20	-17	2
R	734	54	140	24	7	2
S	272	46	159	57	28	2
T	245	37	90	6	31	2

I have entered the code below:
> nn <- neuralnet(
+ class~param1+param2+param3+param4+param5+param5,
+ data=mydata, hidden=2, err.fct="ce",
+ linear.output=FALSE)

However the error appeared:
Error in model.frame.default(formula.reverse, data) : 
  object is not a matrix

I changed the data frame to matrix:
mydata.mat=as.matrix(mydata)

but still the same error appears... 

How can I fix this ? I would be very grateful for your help  !



--
View this message in context: http://r.789695.n4.nabble.com/neural-net-tp4652927.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list