internal
diss_to_neighbors(
diss_matrix,
k = NULL,
k_diss = NULL,
k_range = NULL,
spike = NULL,
return_dissimilarity = FALSE,
skip_first = FALSE
)a matrix representing the dissimilarities between
observations in a matrix Xu and observations in another matrix
Xr. Xr in rows Xu in columns.
an integer value indicating the k-nearest neighbors of each
observation in Xu that must be selected from Xr.
an integer value indicating a dissimilarity treshold.
For each observation in Xu, its nearest neighbors in Xr
are selected as those for which their dissimilarity to Xu is below
this k_diss threshold. This treshold depends on the corresponding
dissimilarity metric specified in diss_method. Either k or
k_diss must be specified.
an integer vector of length 2 which specifies the minimum
(first value) and the maximum (second value) number of neighbors to be
retained when the k_diss is given.
a vector of integers indicating what observations in Xr
(and Yr) must be 'forced' to always be part of all the neighborhoods.
logical indicating if the input dissimilarity must be mirroed in the output.
a logical indicating whether to skip the first neighbor or
not. Default is FALSE. This is used when the search is being conducted
in symmetric matrix of distances (i.e. to avoid that the nearest neighbor of
each observation is itself).