View source: R/SCAMonitorFactory.R
SCAMonitorFactory | R Documentation |
Creates a monitoring function that prints the current generation and the best fitness score
to the console at specified intervals. Intended for use as a monitor
function in GA runs.
SCAMonitorFactory(interval = 100)
interval |
An integer specifying the interval for printing progress updates. Default is 100 (prints every 100 generations). |
A monitoring function that can be used with GA. The returned function takes a GA object and prints progress information at the specified interval.
# Create monitor that prints every 100 generations (default)
monitor <- SCAMonitorFactory()
# ga(..., monitor = monitor)
# Create monitor that prints every 50 generations
monitor <- SCAMonitorFactory(50)
# ga(..., monitor = monitor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.