I am using the neuralnet package, to train a neural network. I am using rmarkdown html format, but at the moment of printing the plot is not displayed.
---
title: "neuralnet"
author: "RED"
date: "`r Sys.Date()`"
output:
html_document:
toc: yes
---
```{r}
library(neuralnet)
data(infert, package="datasets")
net.infert <- neuralnet(case~parity+induced+spontaneous, infert,
err.fct="ce", linear.output=FALSE, likelihood=TRUE)
```
```{r}
plot(net.infert)
```
Any idea how to fix this.
Add rep="best" to the plot command. If you don't, plot.nn plots each training epoch by constantly opening new graphics devices.
---
title: "neuralnet"
author: "RED"
date: "`r Sys.Date()`"
output:
html_document:
toc: yes
---
```{r}
library(neuralnet)
data(infert, package="datasets")
net.infert <- neuralnet(case~parity+induced+spontaneous, infert,
err.fct="ce", linear.output=FALSE, likelihood=TRUE)
```
```{r}
plot(net.infert, rep="best")
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With