Interface NearestNeighbourSearchWithIndices

    • Method Detail

      • kNearestNeighboursIndices

        int[] kNearestNeighboursIndices​(weka.core.Instance target,
                                        int kNN)
                                 throws Exception
        Returns the indices of the k nearest instances in the current neighbourhood to the supplied instance.
        Parameters:
        target - The instance to find the k nearest neighbours for.
        kNN - The number of nearest neighbours to find.
        Returns:
        the indices of the k nearest neighbors in the dataset
        Throws:
        Exception - if the neighbours could not be found.