cost_function: Calculates the cost function of the K-medoids algorithm for...

Description Usage Arguments Value Author(s) References Examples

Description

Calculates the cost function of the K-medoids algorithm for the given input. Should not be used by the user.

Usage

1
cost_function(w, var_list)

Arguments

w

The weight vector of length n-1, where n is the number of variables, for the first n-1 . See the reference in find_kmedoids_weights for the explanation.

var_list

A list of variables containing the following: data, the relevant data. method, the number of cluster k. bounds, the bounds on the weights. fk: see find_kmedoids_weights for details.

Value

Cost function

The value of the cost function of this clustering with the given weights.

Author(s)

Jeroen van den Hoven

References

Clustering with optimised weights for Gower's metric: Using hierarchical clustering and Quasi-Newton methods to maximise the cophenetic correlation coefficient, Jeroen van den Hoven.

Examples

1
2
3
4
data(faithful)
L = list(data = faithful, k = 2, bounds = c(0,1))
w = 0.4
cost_function(w,L)

Jeroentjeh/opthierarch documentation built on May 26, 2019, 7:28 a.m.