Class ExternalDoubleOutlierScore

  • All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    public class ExternalDoubleOutlierScore
    extends java.lang.Object
    implements OutlierAlgorithm
    External outlier detection scores, loading outlier scores from an external file. This class is meant to be able to read the default output of ELKI, i.e. one object per line, with the DBID specified as ID= and the outlier score specified with an algorithm-specific prefix.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ExternalDoubleOutlierScore.Par
      Parameterization class
      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COMMENT
      The comment character.
      private java.net.URI file
      The file to be reparsed
      static java.lang.String ID_PATTERN_DEFAULT
      The default pattern for matching ID lines.
      private java.util.regex.Pattern idpattern
      object id pattern
      private boolean inverted
      Inversion flag.
      private static elki.logging.Logging LOG
      The logger for this class.
      private elki.utilities.scaling.ScalingFunction scaling
      Scaling function to use
      private java.util.regex.Pattern scorepattern
      object score pattern
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalDoubleOutlierScore​(java.net.URI file, java.util.regex.Pattern idpattern, java.util.regex.Pattern scorepattern, boolean inverted, elki.utilities.scaling.ScalingFunction scaling)
      Constructor.
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        The logger for this class.
      • COMMENT

        public static final java.lang.String COMMENT
        The comment character.
        See Also:
        Constant Field Values
      • ID_PATTERN_DEFAULT

        public static final java.lang.String ID_PATTERN_DEFAULT
        The default pattern for matching ID lines.
        See Also:
        Constant Field Values
      • file

        private java.net.URI file
        The file to be reparsed
      • idpattern

        private java.util.regex.Pattern idpattern
        object id pattern
      • scorepattern

        private java.util.regex.Pattern scorepattern
        object score pattern
      • scaling

        private elki.utilities.scaling.ScalingFunction scaling
        Scaling function to use
      • inverted

        private boolean inverted
        Inversion flag.
    • Constructor Detail

      • ExternalDoubleOutlierScore

        public ExternalDoubleOutlierScore​(java.net.URI file,
                                          java.util.regex.Pattern idpattern,
                                          java.util.regex.Pattern scorepattern,
                                          boolean inverted,
                                          elki.utilities.scaling.ScalingFunction scaling)
        Constructor.
        Parameters:
        file - File to load
        idpattern - Pattern to match IDs
        scorepattern - Pattern to match scores with
        inverted - Inversion flag
        scaling - Score scaling function
    • Method Detail

      • getInputTypeRestriction

        public elki.data.type.TypeInformation[] getInputTypeRestriction()
        Specified by:
        getInputTypeRestriction in interface elki.Algorithm
      • run

        public OutlierResult run​(elki.database.relation.Relation<?> relation)
        Run the algorithm.
        Parameters:
        relation - Relation to use
        Returns:
        Result