fitNN {genMCMCDiag} | R Documentation |
Helpful mini function to fit the nearest neighbor (NN) algorithm given a set and defined distance
Description
Helpful mini function to fit the nearest neighbor (NN) algorithm given a set and defined distance
Usage
fitNN(uniqueDraws, uniqueLabels, distance, minDist)
Arguments
uniqueDraws |
List of unique values that make up the set on which we are using the NN algorithm |
uniqueLabels |
List of unique labels associated 1-1 with the unique values |
distance |
Function with arguments x,y that returns a distance defined on the given values |
minDist |
Minimum possible distance between two points that aren't equivalent. May be ignored, but if possible to specify, may speed up the algorithm. |
Value
List. tsSolution gives the ordered labels, tsValues gives the ordered values, tsDiffs is a vector of distances between consecutive values in tsValues
[Package genMCMCDiag version 0.2.2 Index]