linf.csts: Truncated dominant community state types with configurable...

View source: R/linf.R

linf.cstsR Documentation

Truncated dominant community state types with configurable low-support handling

Description

Forms provisional depth-1 dominance sample sets from the dominant feature of each sample and then applies the minimum support threshold n0. Sets with fewer than n0 samples are handled according to low.freq.policy:

  • "pure": retain only sets with support >= n0 as named dCSTs and collapse all low-support sets into rare.label.

  • "absorb": reassign each low-support sample to the retained state with the largest value among the retained features (ties handled by tie.method).

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

S

Numeric matrix (samples x features), typically L-infinity relatives.

feature.ids

Optional character vector of stable feature identifiers, length ncol(S).

feature.labels

Optional character vector of display labels, length ncol(S).

n0

Integer >= 1. Minimum support required to retain a dominance sample set.

low.freq.policy

Character. One of "pure" or "absorb". Default: "pure". The legacy value "rare" is still accepted as a deprecated alias for "pure".

rare.label

Character scalar used when low.freq.policy = "pure". Default: "RARE_DOMINANT".

tie.method

Character. Tie handling passed to linf.cells() and used during absorb reassignment ("first", "random", "error").

return.diagnostics

Logical. If TRUE, return reassignment diagnostics.

return.landmarks

Logical. If TRUE, attach a depth-1 landmark summary computed by linf.landmarks.

landmark.types

Character vector of landmark types passed to linf.landmarks when return.landmarks = TRUE.

landmark.view

Character. Landmark view passed to linf.landmarks when return.landmarks = TRUE.

backend

Character. Matrix backend to use: "auto", "dense", or "sparse". The default "auto" preserves sparse input and otherwise uses the dense path.

Value

List with:

  • cell.index, cell.id, cell.label: active labeling per low.freq.policy

  • cell.index.rare, cell.id.rare, cell.label.rare

  • cell.index.absorb, cell.id.absorb, cell.label.absorb

  • kept.cells.idx, kept.cells.id, kept.cells.lbl

  • raw.index, raw.id, raw.label

  • feature.ids, feature.labels

  • size.table, size.table.id

  • n0, low.freq.policy, rare.label

  • diagnostics (if return.diagnostics = TRUE)

  • landmarks (if return.landmarks = TRUE)


linf documentation built on Aug. 5, 2026, 9:08 a.m.