% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hnp_package.r
\name{hnp_map_classes}
\alias{hnp_map_classes}
\title{Classes Mapping function for HNP Algorithm
Map ordered class labels to internal levels "1", ..., "T"}
\usage{
hnp_map_classes(data, class_col, ...)
}
\arguments{
\item{data}{A data.frame or data.table containing the dataset.}

\item{class_col}{Character scalar. Name of the class/label column in \code{data}.}

\item{...}{Two or more original class labels given in importance order. The
first label maps to "1", the second to "2", and so on. Labels must be
non-empty, non-NA, and unique.}
}
\value{
A data.frame with the input \code{data} added with \code{class_col} converted to a factor whose levels
are the internal labels c("1","2",...,"T").
}
\description{
Validate the class column and re-label the provided class names
to internal factor levels "1", "2", ..., "T". The input order of the
labels in \code{...} is treated as the importance order: the first label maps to
level "1" (highest priority), and the last label maps to the
level "T" (lowest priority). Supports any number of classes \code{T >= 2}.
}
\examples{
df <- data.frame(y = c("low", "mid", "high", "mid"), x1 = rnorm(4))
df2 <- hnp_map_classes(df, class_col = "y", "high", "mid", "low")
}
