prep_data_dist: Prepares data and distance matrices for metric calculation

View source: R/metric-helpers.R

prep_data_distR Documentation

Prepares data and distance matrices for metric calculation

Description

Prepares data and distance matrices for metric calculation

Usage

prep_data_dist(
  object,
  new_data = NULL,
  dists = NULL,
  dist_fun = philentropy::distance
)

Arguments

object

A fitted cluster_spec object.

new_data

A dataset to calculate predictions on. If NULL, the trained cluster assignments from the fitted object are used.

dists

A distance matrix for the data. If NULL, distance is computed on new_data using the stats::dist() function.

dist_fun

A custom distance functions.

Value

A list


tidyclust documentation built on April 11, 2025, 5:47 p.m.