% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sparse_pca.R
\name{sparse_pca}
\alias{sparse_pca}
\title{Sparse Principal Component Analysis (Sparse PCA)}
\usage{
sparse_pca(data, K = NULL, threshold = 0.9, verbose = FALSE)
}
\arguments{
\item{data}{Numeric data frame or matrix}

\item{K}{Number of components (auto if NULL)}

\item{threshold}{Variance threshold for automatic K selection}

\item{verbose}{Logical; prints diagnostic messages}
}
\value{
List with PCA results
}
\description{
Performs Sparse PCA using elastic net regularisation with custom scree plot and biplot.
}
\examples{
{
data(mtcars)
Result <- sparse_pca(mtcars)
}
}
