'Plotting the learning curve with neuralnet package in R?

I trained a model with the neuralnet package:

nn <- neuralnet(Type ~ ., data,
          hidden=c(10,5),
          threshold = 0.01,
          learningrate.limit = NULL,
          learningrate.factor = list(minus = 0.5, plus = 1.2),
          lifesign = 'full',
          algorithm = "rprop+")

Console output:

hidden: 10, 5    thresh: 0.01    rep: 1/1    steps:    1000 min thresh: 1.41903532938929
                                                       2000 min thresh: 0.335967134814047
                                                       3000 min thresh: 0.129174778379192
                                                       4000 min thresh: 0.0481674081153279
                                                       5000 min thresh: 0.020993245402829
                                                       5603 error: 0.00192  time: 1.41 secs

https://www.rdocumentation.org/packages/neuralnet/versions/1.44.2/topics/neuralnet

nn dosn't seem to store the training progress. So I tried to

cap <- capture.output(nn <- neuralnet(...))

to save the console output and plot it, but capture.output didn't capture anything.

How can I get thresh/error per step or learning curve in a graph?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source