% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CIBERSORT.R
\name{CoreAlg}
\alias{CoreAlg}
\title{Core Algorithm for CIBERSORT Deconvolution}
\usage{
CoreAlg(X, y, absolute, abs_method)
}
\arguments{
\item{X}{Matrix or data frame containing signature matrix (predictor variables).
Rows are genes, columns are cell types.}

\item{y}{Numeric vector containing the mixture sample expression (response variable).}

\item{absolute}{Logical indicating whether to use absolute space for weights.
Default is FALSE (relative proportions).}

\item{abs_method}{String specifying the method for absolute space weights:
`"sig.score"` or `"no.sumto1"`.}
}
\value{
List containing:
\describe{
  \item{w}{Estimated cell type weights/proportions}
  \item{mix_rmse}{Root mean squared error of the deconvolution}
  \item{mix_r}{Correlation coefficient between observed and predicted mixture}
}
}
\description{
Performs nu-regression using support vector machines (SVM) to estimate
cell type proportions. This is the core computational engine of CIBERSORT,
using nu-SVR with linear kernel to decompose mixed gene expression signals.
}
\examples{
# Simulate data
set.seed(123)
X <- matrix(rnorm(100), nrow = 10)
rownames(X) <- paste0("Gene", 1:10)
colnames(X) <- paste0("Cell", 1:10)
y <- rnorm(10)
names(y) <- paste0("Gene", 1:10)

# Run core algorithm
result <- CoreAlg(X, y, absolute = FALSE, abs_method = "sig.score")
if (!is.null(result)) str(result)
}
