plot_progress {fastTopics} | R Documentation |
Plot Progress of Model Fitting Over Time
Description
Create a plot showing improvement in one or more Poisson NMF or multinomial topic model fits over time.
Usage
plot_progress(
fits,
x = c("timing", "iter"),
y = c("loglik", "dev", "res"),
add.point.every = 20,
colors = c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7"),
linetypes = "solid",
linesizes = 0.5,
shapes = 19,
fills = "white",
e = 0.01,
theme = function() theme_cowplot(12)
)
Arguments
fits |
An object of class |
x |
Choose |
y |
Column of the "progress" data frame used to assess
progress of the Poisson NMF optimization method(s). Should be one
of |
add.point.every |
A positive integer giving the iteration
interval for drawing points on the progress curves. Set to
|
colors |
Colours used to draw progress curves; passed as the
|
linetypes |
Line types used to draw progress curves; passed as
the |
linesizes |
Line sizes used to draw progress curves; passed as
the |
shapes |
Shapes used to draw points at the selected
iterations; passed as the |
fills |
Fill colours used to draw points at the selected
iterations; passed as the |
e |
A small, positive number added to the vertical axis (for
|
theme |
The ‘ggplot2’ “theme”. |
Details
The horizontal axis shows the recorded runtime (in s), and the vertical axis shows some quantity measuring the quality of the fit: the log-likelihood, deviance or maximum residual of the Karush-Kuhn-Tucker (KKT) first-order optimality conditions. To better visualize log-likelihoods and deviances, log-likelihood and deviance differences are shown on the logarithmic scale. Differences are calculated with respect to the best value achieved over all the fits compared.
Note that only minimal argument checking is performed.
Value
A ggplot
object.