R/decomp_Isomap.R

# decomp_Isomap.R
# ::rtemis::
# 2025- EDG rtemis.org

# %% decomp_.IsomapConfig ----
#' Isomap Decomposition
#'
#' @keywords internal
#' @noRd
method(decomp_, IsomapConfig) <- function(
  config,
  x,
  execution_config = NULL,
  verbosity = 1L
) {
  # Checks ----
  check_dependencies("vegan")
  check_unsupervised_data(x = x, allow_missing = FALSE, verbosity = verbosity)

  # Decompose ----
  msg("Decomposing with", config@algorithm, "...", verbosity = verbosity)
  dst <- vegan::vegdist(x = x, method = config[["dist_method"]])
  decom <- vegan::isomap(
    dist = dst,
    ndim = config[["k"]],
    k = config[["nsd"]],
    path = config[["path"]]
  )
  check_inherits(decom, "isomap")
  list(decom = decom, transformed = decom[["points"]])
} # /rtemis::decomp_.IsomapConfig

Try the rtemis package in your browser

Any scripts or data that you put into this service are public.

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