new_cluster_metric: Construct a new clustering metric function

View source: R/metric-aaa.R

new_cluster_metricR Documentation

Construct a new clustering metric function

Description

These functions provide convenient wrappers to create the one type of metric functions in celrry: clustering metrics. They add a metric-specific class to fn. These features are used by cluster_metric_set() and by tune_cluster() when tuning.

Usage

new_cluster_metric(fn, direction)

Arguments

fn

A function.

direction

A string. One of:

  • "maximize"

  • "minimize"

  • "zero"

Value

A cluster_metric object.


tidyclust documentation built on Sept. 26, 2023, 1:08 a.m.