xxxxxxxxxx
print(r.eval("""
library(datasets); library(nnet); data(longley)
features<-longley[,1:6]; targets<-longley[,7]
model<-nnet(Employed~.,longley,size=18,
maxit=400,linout=T,decay=.01)
predictions<-predict(model,features,type='raw')
mean((targets-predictions)^2)
"""))
No comments:
Post a Comment