getAffinityMatrix: Get Affinity Matrix
Description
This function returns an affinity matrix within knn-nearest neighbors from the distance matrix.
Usage
getAffinityMatrix(distance2, knn, nc)
Arguments
distance2
The distance matrix for each observation
knn
The number of nearest neighbors
nc
The number of observations for data in this class
Value
an affinity matrix - the larger the element in the matrix, the closer two data points are