| plot_network | R Documentation |
Plots the architecture of a feed-forward multilayer perceptron, showing input, hidden, and output layers in a visually enhanced layout.
plot_network(
object,
max_neurons = 20,
show_connections = TRUE,
neuron_cex = 2.2,
label_cex = 0.9,
main = "Neural Network Architecture",
...
)
object |
A fitted |
max_neurons |
Maximum number of neurons to display per layer. If a layer has more neurons than this value, only a subset is displayed and the layer is annotated. |
show_connections |
Logical. If |
neuron_cex |
Size of neuron circles. |
label_cex |
Size of text labels. |
main |
Main title of the plot. |
... |
Additional graphical arguments. |
The input object invisibly.
fit <- met_mlp(
formula = Petal.Width ~ Sepal.Length + Sepal.Width + Petal.Length,
data = iris,
hidden_layers = c(5),
optimizer = optimizer_pso(pop_size = 10, max_iter = 10),
seed = 123,
verbose = FALSE
)
plot_network(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.