Perform linear or non-linear decomposition of numeric data.
decomp(
x,
algorithm = "ICA",
config = NULL,
execution_config = setup_FutureExecution(),
outdir = NULL,
verbosity = 1L
)Decomposition object.
Matrix, data frame, or DecomposeConfig object: Input data, or a
DecomposeConfig recipe (from setup_DecomposeConfig) carrying the data
path, algorithm config, and output directory.
Character: Decomposition algorithm. Not needed when config
is supplied, which names its own; an explicit algorithm that disagrees
with config is an error.
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_decomposition() replays that selection.
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.
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.
Integer: Verbosity level.
EDG
See docs.rtemis.org/r for detailed documentation.
iris_pca <- decomp(exc(iris, "Species"), algorithm = "PCA")
Run the code above in your browser using DataLab