% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{soft_impute_cpp}
\alias{soft_impute_cpp}
\title{Fast Matrix Completion using Soft-Impute Algorithm}
\usage{
soft_impute_cpp(Y, O, lambda, max_iter = 1000L, tol = 1e-05)
}
\arguments{
\item{Y}{Observed outcome matrix (N x T). Unobserved entries should be 0.}

\item{O}{Binary mask matrix (N x T): 1 = observed, 0 = missing (treated post).}

\item{lambda}{Nuclear norm penalty (soft-threshold on singular values).}

\item{max_iter}{Maximum iterations.}

\item{tol}{Convergence tolerance (relative Frobenius norm change).}
}
\value{
A numeric matrix of the same dimension as \code{Y} (N x T): the
completed low-rank matrix \code{L} that minimises the soft-thresholded
nuclear-norm objective.
}
\description{
Solves: min_L (1/2) ||O o (Y - L)||\emph{F^2 + lambda * ||L||}*
via iterative SVD soft-thresholding (Mazumder, Hastie, Tibshirani 2010).
Note: lambda is NOT normalized by |O|. Default lambda = 0.01 * sigma_max(Y).
}
