% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linf.R
\name{refine.linf.csts}
\alias{refine.linf.csts}
\title{Refine a dCST hierarchy by one level}
\usage{
refine.linf.csts(
  M,
  csts,
  n0 = 50,
  refinement.factor = 2,
  sep = "__",
  low.freq.policy = c("pure", "absorb"),
  rare.label = "RARE_DOMINANT",
  verbose = TRUE,
  backend = c("auto", "dense", "sparse")
)
}
\arguments{
\item{M}{Numeric matrix (samples x features) used for refinement. Column names
should match feature labels used in dCST names.}

\item{csts}{A \code{"linf.csts"} object.}

\item{n0}{Integer >= 1. Minimum support required to retain a child lineage
(passed to \code{linf.csts}).}

\item{refinement.factor}{Numeric > 0. Auto-refine parent lineages with
support >= \code{refinement.factor * n0}.}

\item{sep}{Character scalar used to concatenate hierarchical labels.}

\item{low.freq.policy}{Character. One of \code{"pure"} or \code{"absorb"}.
Default: \code{"pure"}. The legacy value \code{"rare"} is still accepted as
a deprecated alias for \code{"pure"}.}

\item{rare.label}{Character scalar for rare buckets when \code{low.freq.policy = "pure"}.}

\item{verbose}{Logical. If TRUE, print progress information.}

\item{backend}{Character. Matrix backend to use: \code{"auto"},
\code{"dense"}, or \code{"sparse"}. The default \code{"auto"} inherits the
backend from \code{M} or from \code{csts} when available.}
}
\value{
Updated \code{"linf.csts"} object with \code{cst.depth} increased by one and
updated \code{cell.label}. Policy-specific views are stored in
\code{cell.label.rare} and \code{cell.label.absorb}.
}
\description{
Selects well-supported leaf dominance-lineages and refines them by dropping
the dominant feature(s) encoded in the parent label path and re-applying
\code{\link{linf.csts}} to the remaining features. The resulting child
labels are appended to the parent label using \code{sep}.

Low-support child lineages are handled by \code{low.freq.policy}. When
\code{low.freq.policy = "pure"}, rare buckets at depth >= 2 become
parent-prefixed automatically via the hierarchical \code{paste(parent, child, sep = sep)}.
}
