Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.keras_training_history

Plot training history


Description

Plots metrics recorded during training.

Usage

## S3 method for class 'keras_training_history'
plot(
  x,
  y,
  metrics = NULL,
  method = c("auto", "ggplot2", "base"),
  smooth = getOption("keras.plot.history.smooth", TRUE),
  theme_bw = getOption("keras.plot.history.theme_bw", FALSE),
  ...
)

Arguments

x

Training history object returned from fit.keras.engine.training.Model().

y

Unused.

metrics

One or more metrics to plot (e.g. c('loss', 'accuracy')). Defaults to plotting all captured metrics.

method

Method to use for plotting. The default "auto" will use ggplot2 if available, and otherwise will use base graphics.

smooth

Whether a loess smooth should be added to the plot, only available for the ggplot2 method. If the number of epochs is smaller than ten, it is forced to false.

theme_bw

Use ggplot2::theme_bw() to plot the history in black and white.

...

Additional parameters to pass to the plot() method.


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.