partition (version 0.1.0)

direct_distance: Target based on minimum distance matrix

Description

Directors are functions that tell the partition algorithm what to try to reduce. as_director() is a helper function to create new directors to be used in partitioners. partitioners can be created with as_partitioner().

direct_distance() fits a distance matrix using either Pearson's or Spearman's correlation and finds the pair with the smallest distance to target. If the distance matrix already exists, direct_distance() only fits the distances for any new reduced variables. direct_distance_pearson() and direct_distance_spearman() are convenience functions that directly call the type of distance matrix.

Usage

direct_distance(.partition_step, spearman = FALSE)

direct_distance_pearson(.partition_step)

direct_distance_spearman(.partition_step)

Arguments

.partition_step

a partition_step object

spearman

Logical. Use Spearman's correlation?

Value

a partition_step object

See Also

Other directors: as_director, direct_k_cluster