The package, neuralnet
, provides the plot
function to visualize a built neural network and the gwplot
function to visualize generalized weights. In following recipe, we will cover how to use these two functions.
You need to have completed the previous recipe by training a neural network and have all basic information saved in the network.
Perform the following steps to visualize the neural network and the generalized weights:
You can visualize the trained neural network with the
plot
function:> plot(network)
Furthermore, you can use
gwplot
to visualize the generalized weights:> par(mfrow=c(2,2)) > gwplot(network,selected.covariate="Petal.Width") > gwplot(network,selected.covariate="Sepal.Width") > gwplot(network,selected.covariate="Petal.Length") > gwplot(network,selected.covariate="Petal.Width")