Segment a dataset by a single sample and compute vicinities for it and the remaining samples in the neighborhood.
Useful links