% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3methods.R
\name{fitted.nmf}
\alias{fitted.nmf}
\alias{fitted.nmfae}
\alias{fitted.nmf.sem}
\title{Extract fitted values from NMF models}
\usage{
\method{fitted}{nmf}(object, ...)

\method{fitted}{nmfae}(object, ...)

\method{fitted}{nmf.sem}(object, ...)
}
\arguments{
\item{object}{A fitted model object of class \code{"nmf"}, \code{"nmfkc"},
\code{"nmfae"}, \code{"nmfre"}, or \code{"nmf.sem"}.}

\item{...}{For \code{nmf.sem}: optionally \code{Y1} and \code{Y2}.}
}
\value{
The fitted matrix \eqn{X B}.
}
\description{
Returns the reconstructed matrix \eqn{\hat{Y} = X B} from a fitted
NMF model.

For \code{nmf.sem} objects, returns the equilibrium prediction
\eqn{\hat{Y}_1 = M_{model} Y_2} if available. Supply \code{Y1} and
\code{Y2} to get the direct reconstruction
\eqn{X (C_1 Y_1 + C_2 Y_2)} instead.
}
\examples{
result <- nmfkc(matrix(runif(50), 5, 10), rank = 2)
fitted(result)

}
\seealso{
\code{\link{nmfkc}}, \code{\link{nmfae}}, \code{\link{nmfre}},
\code{\link{nmf.sem}}, \code{\link{residuals.nmf}}
}
