Class OutlierScoreAdapter

  • All Implemented Interfaces:
    elki.evaluation.scores.ScoreEvaluation.Adapter, elki.utilities.datastructures.iterator.Iter

    public class OutlierScoreAdapter
    extends java.lang.Object
    implements elki.evaluation.scores.ScoreEvaluation.Adapter
    This adapter can be used for an arbitrary collection of Integers, and uses that id1.compareTo(id2) != 0 for id1 != id2 to satisfy the comparability.

    Note that of course, no id should occur more than once.

    The ROC values would be incorrect then anyway!

    Since:
    0.7.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private elki.database.ids.DBIDIter iter
      Original iterator.
      private double prev
      Previous value.
      private elki.database.relation.DoubleRelation scores
      Outlier score.
      private elki.database.ids.DBIDs set
      Set of positive objects
    • Field Detail

      • set

        private elki.database.ids.DBIDs set
        Set of positive objects
      • iter

        private elki.database.ids.DBIDIter iter
        Original iterator.
      • scores

        private elki.database.relation.DoubleRelation scores
        Outlier score.
      • prev

        private double prev
        Previous value.
    • Constructor Detail

      • OutlierScoreAdapter

        public OutlierScoreAdapter​(elki.database.ids.DBIDs positive,
                                   OutlierResult o)
        Constructor.
        Parameters:
        positive - Positive objects
        o - Result
    • Method Detail

      • valid

        public boolean valid()
        Specified by:
        valid in interface elki.utilities.datastructures.iterator.Iter
      • advance

        public OutlierScoreAdapter advance()
        Specified by:
        advance in interface elki.utilities.datastructures.iterator.Iter
      • tiedToPrevious

        public boolean tiedToPrevious()
        Specified by:
        tiedToPrevious in interface elki.evaluation.scores.ScoreEvaluation.Adapter
      • test

        public boolean test()
        Specified by:
        test in interface elki.evaluation.scores.ScoreEvaluation.Adapter
      • numPositive

        public int numPositive()
        Specified by:
        numPositive in interface elki.evaluation.scores.ScoreEvaluation.Adapter
      • numTotal

        public int numTotal()
        Specified by:
        numTotal in interface elki.evaluation.scores.ScoreEvaluation.Adapter