% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3methods.R
\name{plot.nmfre}
\alias{plot.nmfre}
\alias{plot.nmf.sem}
\title{Plot convergence diagnostics for NMF models}
\usage{
\method{plot}{nmfre}(x, ...)

\method{plot}{nmf.sem}(x, ..., which = c("full", "reconstruction", "both"))
}
\arguments{
\item{x}{A fitted model object.}

\item{...}{Additional graphical arguments passed to \code{\link{plot}}.}

\item{which}{For \code{plot.nmf.sem}: which objective to plot.
One of \code{"full"} (default; \code{loss + penalties}, the actual
monotonically-decreasing quantity that the multiplicative updates
minimize), \code{"reconstruction"} (Frobenius distance only,
\eqn{\| Y_1 - X B \|_F^2}), or \code{"both"} (overlay both with a
legend).  \code{"both"} is useful for diagnosing whether
regularization is actively shaping the solution: if the two curves
diverge, the penalties are pulling the optimizer away from the
pure least-squares minimum.}
}
\value{
Invisible \code{NULL}.
}
\description{
Plots the objective function value over iterations for \code{nmfre} and
\code{nmf.sem} objects. (For \code{nmfkc} and \code{nmfae}, plot methods
are defined in their respective source files.)
}
\examples{
\donttest{
set.seed(1)
Y <- matrix(runif(20), nrow = 4)
A <- diag(5)
res <- nmfre(Y, A, rank = 2, wild.bootstrap = FALSE)
plot(res)
}

}
\seealso{
\code{\link{nmfre}}, \code{\link{nmf.sem}}
}
