plot.nn, a method for the plot generic. It is designed
for an inspection of the weights for objects of class nn, typically produced by neuralnet.## S3 method for class 'nn':
plot.nn(x, rep = NULL, x.entry = NULL, x.out = NULL,
radius = 0.15, arrow.length = 0.2, intercept = TRUE,
intercept.factor = 0.4, information = TRUE,
information.pos = 0.1, col.entry.synapse = "black",
col.entry = "black", col.hidden = "black",
col.hidden.synapse = "black", col.out = "black",
col.out.synapse = "black", col.intercept = "blue",
fontsize = 12, dimension = 6, show.weights = TRUE,
file = NULL, ...)nnpar).neuralnetXOR <- c(0,1,1,0)
xor.data <- data.frame(expand.grid(c(0,1), c(0,1)), XOR)
print(net.xor <- neuralnet( XOR~Var1+Var2, xor.data, hidden=2, rep=5))
plot(net.xor, rep="best")Run the code above in your browser using DataLab