Description Usage Arguments Value
View source: R/forEvaluation.R
Given pairwise similarities and links (a clustering), find prototypes for each cluster and maximum distance to prototype for that cluster. The output is a data frame with one row representing one cluster, and the metric max minimax radius for the given clustering is given by max(out$minimaxRadius).
1 | distToPrototype(allPairwise, distSimCol, linkCol, pairColNums, myDist = TRUE)
|
allPairwise |
name of data frame containing all pairwise comparisons. This needs to have at least four columns, one representing the first item in the comparison, one representing the second item, one representing whether the pair is linked in the given clustering, and the last representing a distance or similarity metric. These are enumerated in the next three parameters. |
distSimCol |
name of column in 'allPairwise' indicating distances or similarities, input as character, e.g. "l2dist". If this is a similarity and not a difference, input 'myDist' parameter to be FALSE. If a similarity measure is used, distance will be calcualted as 1 - similarity. |
linkCol |
name of column in 'allPairwise' with links, input as character, e.g. "minimax0.4" |
pairColNums |
vector of length 2 indicating the column numbers in 'allPairwise' of 1. item 1 in comparison, 2. item 2 in comparison |
myDist |
is 'distSimCol' a distance or similarity measure? Default TRUE, i.e. distance measure |
data frame with columns 'cluster', 'minimaxRadius', 'prototype'. The metric max minimax radius for the given clustering is given by max(out$minimaxRadius)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.