between two input variables and the resulting output (class probability)
with image() or persp().
Here is an example (you need the mlbench package from CRAN to run this):
library(mlbench) x <- as.data.frame(mlbench.spirals(400,cycles=1.5,sd=.1)) plot(x$x.1,x$x.2,col=unclass(x$classes))
nn1 <- nnet(classes ~ x.1 + x.2, data = x, size=20)
xval <- seq(-1.5,1.5,length=100)
map <- outer(xval,xval,FUN=function(x,y) {predict(nn1,data.frame(x.1=x,x.2=y))})
image(map)
par("usr"=c(-1.5,1.5,-1.5,1.5))
points(x$x.1,x$x.2,pch=as.numeric(x$classes)+15,col=as.numeric(x$classes)+4)
### or use:
persp(z=map,expand=.3,shade=.7,col="orange",phi=45,theta=180)
If you have more than 2 input variables you can keep the other ones at fixed levels and see what happens.
hth,
Martin Keller-Ressel
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
