clust_proto_random: Prototype record from a cluster.
Description
Prototype record from a cluster.
Usage
clust_proto_random(
cluster,
prob = rep(1/nrow(cluster), nrow(cluster)),
id = TRUE
)
clust_proto_minimax(cluster, distance, id = TRUE, ...)
Arguments
cluster
A data frame of the clustered records.
prob
A vector of length nrow(cluster) that sums to 1, giving the probability of selection.
id
Logical indicator to return id of record selected (TRUE) or actual record (FALSE). Note,
if returning id, must have original row numbers as rownames in each cluster.
distance
A distance function for comparing records
...
Additional arguments passed to the comparison function
Value
If id = FALSE, returns the prototype record from an individual cluster. Otherwise,
returns the record id of the prototype record for that cluster. If there is a tie in the minimax
prototype method, then random selection is used to break the tie.