decomp: Perform Data Decomposition

View source: R/decomp.R

decompR Documentation

Perform Data Decomposition

Description

Perform linear or non-linear decomposition of numeric data.

Usage

decomp(
  x,
  algorithm = "ICA",
  config = NULL,
  execution_config = setup_FutureExecution(),
  outdir = NULL,
  verbosity = 1L
)

Arguments

x

Matrix, data frame, or DecomposeConfig object: Input data, or a DecomposeConfig recipe (from setup_DecomposeConfig) carrying the data path, algorithm config, and output directory.

algorithm

Character: Decomposition algorithm. Not needed when config is supplied, which names its own; an explicit algorithm that disagrees with config is an error.

config

DecompositionConfig: Algorithm-specific config. Its features selects the columns of x to decompose; NULL selects every numeric column, since a decomposition reads a numeric matrix. The returned object's config carries the resolved names, and apply_decomp() replays that selection.

execution_config

ExecutionConfig object: Execution settings, e.g. setup_FutureExecution or setup_SerialExecution. A decomposition dispatches no work to other processes: an algorithm whose threaded trait is TRUE (see decomposition_traits) runs on n_workers_algorithm threads, or on the config's worker count when that is unset. Its device is the compute device of an algorithm that can use one (setup_Autoencoder); every other algorithm runs on the CPU. The config's seed seeds the fit, torch's generator included.

outdir

Character, optional: Output directory. If not NULL, the returned Decomposition object is saved there as an .rds file, alongside a run record (⁠decomp_<algorithm>.record.json⁠) stating what the run resolved. See write_record.

verbosity

Integer: Verbosity level.

Details

See docs.rtemis.org/r for detailed documentation.

Value

Decomposition object.

Author(s)

EDG

Examples

iris_pca <- decomp(exc(iris, "Species"), algorithm = "PCA")

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.