% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linf.R
\name{linf.csts}
\alias{linf.csts}
\title{Truncated dominant community state types with configurable low-support handling}
\usage{
linf.csts(
  S,
  feature.ids = NULL,
  feature.labels = NULL,
  n0 = 50,
  low.freq.policy = c("pure", "absorb"),
  rare.label = "RARE_DOMINANT",
  tie.method = c("first", "random", "error"),
  return.diagnostics = FALSE,
  return.landmarks = FALSE,
  landmark.types = c("endpoint.max", "endpoint.min"),
  landmark.view = c("active", "rare", "absorb"),
  backend = c("auto", "dense", "sparse")
)
}
\arguments{
\item{S}{Numeric matrix (samples x features), typically L-infinity relatives.}

\item{feature.ids}{Optional character vector of stable feature identifiers,
length \code{ncol(S)}.}

\item{feature.labels}{Optional character vector of display labels, length
\code{ncol(S)}.}

\item{n0}{Integer >= 1. Minimum support required to retain a dominance
sample set.}

\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 used when \code{low.freq.policy = "pure"}.
Default: \code{"RARE_DOMINANT"}.}

\item{tie.method}{Character. Tie handling passed to \code{linf.cells()} and used
during absorb reassignment ("first", "random", "error").}

\item{return.diagnostics}{Logical. If TRUE, return reassignment diagnostics.}

\item{return.landmarks}{Logical. If TRUE, attach a depth-1 landmark summary
computed by \code{\link{linf.landmarks}}.}

\item{landmark.types}{Character vector of landmark types passed to
\code{\link{linf.landmarks}} when \code{return.landmarks = TRUE}.}

\item{landmark.view}{Character. Landmark view passed to
\code{\link{linf.landmarks}} when \code{return.landmarks = TRUE}.}

\item{backend}{Character. Matrix backend to use: \code{"auto"},
\code{"dense"}, or \code{"sparse"}. The default \code{"auto"} preserves
sparse input and otherwise uses the dense path.}
}
\value{
List with:
\itemize{
\item \code{cell.index}, \code{cell.id}, \code{cell.label}: active labeling per \code{low.freq.policy}
\item \code{cell.index.rare}, \code{cell.id.rare}, \code{cell.label.rare}
\item \code{cell.index.absorb}, \code{cell.id.absorb}, \code{cell.label.absorb}
\item \code{kept.cells.idx}, \code{kept.cells.id}, \code{kept.cells.lbl}
\item \code{raw.index}, \code{raw.id}, \code{raw.label}
\item \code{feature.ids}, \code{feature.labels}
\item \code{size.table}, \code{size.table.id}
\item \code{n0}, \code{low.freq.policy}, \code{rare.label}
\item \code{diagnostics} (if \code{return.diagnostics = TRUE})
\item \code{landmarks} (if \code{return.landmarks = TRUE})
}
}
\description{
Forms provisional depth-1 dominance sample sets from the dominant feature
of each sample and then applies the minimum support threshold \code{n0}.
Sets with fewer than \code{n0} samples are handled according to
\code{low.freq.policy}:
\itemize{
\item \code{"pure"}: retain only sets with support >= \code{n0} as named
dCSTs and collapse all low-support sets into \code{rare.label}.
\item \code{"absorb"}: reassign each low-support sample to the retained
state with the largest value among the retained features (ties handled
by \code{tie.method}).
}
}
