% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfae.signed.R
\name{nmfae.signed.ecv}
\alias{nmfae.signed.ecv}
\title{Element-wise Cross-Validation for Signed-Bottleneck NMF-AE}
\usage{
nmfae.signed.ecv(Y1, Y2 = Y1, rank = 1:2, rank.encoder = NULL, ...)
}
\arguments{
\item{Y1}{Output matrix (P1 x N).}

\item{Y2}{Input matrix (P2 x N).  Default \code{Y1}.}

\item{rank}{Integer vector of candidate Q values.  Default \code{1:2}.}

\item{rank.encoder}{Integer vector of candidate R values, or \code{NULL}
(default: pair R = Q, diagonal grid).}

\item{...}{Additional arguments:
\describe{
\item{\code{nfolds} / \code{div}}{Number of folds.  Default 5.}
\item{\code{seed}}{RNG seed for fold assignment.  Default 123.}
\item{\code{nstart}}{Number of random restarts per fit.  Default 1.
Signed models have more local minima (the bottleneck can carry
both signs), so \code{nstart >= 10} is recommended for
reproducible rank selection.}
\item{Other args}{\code{epsilon}, \code{maxit}, \code{warm.start},
etc.\ are passed to \code{\link{nmfae.signed}}.}
}}
}
\value{
An object of class \code{c("nmfae.signed.ecv", "nmfae.ecv")} with
\code{objfunc} (MSE per pair), \code{sigma} (RMSE), \code{objfunc.fold}
(per-fold MSE), \code{folds}, \code{QR}, \code{paired}.
}
\description{
Element-wise k-fold cross-validation for \code{\link{nmfae.signed}} to
select the decoder / encoder ranks \eqn{(Q, R)}.  Mirrors
\code{\link{nmfae.ecv}} but uses the \strong{weighted} Signed-Bottleneck NMF-AE fit
path (\code{Y1.weights}): test-fold elements are zero-weighted during
fitting, and held-out MSE is computed on those elements.
}
\section{Lifecycle}{

This function is \strong{experimental}. The interface may change in
future versions.
}

\references{
Ding, C. H. Q., Li, T., & Jordan, M. I. (2010). Convex and
semi-nonnegative matrix factorizations. \emph{IEEE Transactions on
Pattern Analysis and Machine Intelligence}, 32(1), 45--55.
}
\seealso{
\code{\link{nmfae.signed}}, \code{\link{nmfae.ecv}}
}
