Class EvaluateRetrievalPerformance.KNNEvaluator

  • Enclosing class:
    EvaluateRetrievalPerformance<O>

    public static class EvaluateRetrievalPerformance.KNNEvaluator
    extends java.lang.Object
    Evaluate kNN retrieval performance.
    Author:
    Erich Schubert
    • Constructor Summary

      Constructors 
      Constructor Description
      KNNEvaluator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int countkNN​(it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.Object> counters, java.lang.Object l)
      Counting helper for kNN classification.
      void evaluateKNN​(double[] knnperf, ModifiableDoubleDBIDList nlist, Relation<?> lrelation, it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.Object> counters, java.lang.Object label)
      Evaluate by simulating kNN classification for k=1...maxk
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KNNEvaluator

        public KNNEvaluator()
    • Method Detail

      • evaluateKNN

        public void evaluateKNN​(double[] knnperf,
                                ModifiableDoubleDBIDList nlist,
                                Relation<?> lrelation,
                                it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.Object> counters,
                                java.lang.Object label)
        Evaluate by simulating kNN classification for k=1...maxk
        Parameters:
        knnperf - Output data storage
        nlist - Neighbor list
        lrelation - Label relation
        counters - (Reused) map for counting the class occurrences.
        label - Label(s) of query object
      • countkNN

        public int countkNN​(it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.Object> counters,
                            java.lang.Object l)
        Counting helper for kNN classification.
        Parameters:
        counters - Counter storage
        l - Object labels
        Returns:
        Maximum count