Class KNNAugSpaceSampler

  • All Implemented Interfaces:
    IAugmentedSpaceSampler

    public class KNNAugSpaceSampler
    extends AbstractAugmentedSpaceSampler
    Samples interval-valued data from a dataset of precise points. First chooses one point uniformly at random and then generates a point in the interval-valued augmented space from it and its (exact) K nearest neighbors according to euclidean distance on the attributes, excluding the class, which is assumed to be the last attribute.
    • Constructor Summary

      Constructors 
      Constructor Description
      KNNAugSpaceSampler​(weka.core.Instances preciseInsts, java.util.Random rng, int k, weka.core.neighboursearch.NearestNeighbourSearch nearestNeighbour)  
    • Constructor Detail

      • KNNAugSpaceSampler

        public KNNAugSpaceSampler​(weka.core.Instances preciseInsts,
                                  java.util.Random rng,
                                  int k,
                                  weka.core.neighboursearch.NearestNeighbourSearch nearestNeighbour)
        Parameters:
        nearestNeighbour - The nearest neighbour search algorithm to use.
    • Method Detail

      • augSpaceSample

        public weka.core.Instance augSpaceSample()
        Description copied from interface: IAugmentedSpaceSampler
        Generates a point in the augmented space from the AugmentedSpaceSampler's precise dataset.
        Returns:
        A point in the augmented space consisting of upper and lower bounds for each attribute, including the target.
      • getK

        public int getK()
        Returns:
        the k
      • setK

        public void setK​(int k)
        Parameters:
        k - the k to set