jarvisPatrick
clustering
function. Only one of numNbrs
or cutoff
should be given, cutoff
will take precedence if
both are given. If numNbrs
is given, then that many neighbors will be returned for each item in the set.
If cutoff
is given, then, for each item X, every neighbor that has a similarity value greater than or equal to
the cutoff will be returned in the neighbor list for X.
nearestNeighbors(x, numNbrs = NULL, cutoff = NULL, ...)
numNbrs
.
This parameter allows to obtain tighter clustering results.
cmp.similarity
or
fpSim
, for APset and FPset, respectively.
cutoff
is
used, this will be a list of lists, otherwise it will be a matrixcutoff
was used. Each similarity values corresponds to the id number in the
same position in the indexes entryjarvisPatrick
trimNeighbors
data(sdfsample)
ap = sdf2ap(sdfsample)
nnm = nearestNeighbors(ap,cutoff=0.5)
clustering = jarvisPatrick(nnm,k=2,mode="a1b")
Run the code above in your browser using DataLab