Class ExternalDoubleOutlierScore

  • All Implemented Interfaces:
    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
    • Field Detail

      • LOG

        private static final 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
      • 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,
                                          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 TypeInformation[] getInputTypeRestriction()
        Description copied from interface: Algorithm
        Get the input type restriction used for negotiating the data query.
        Specified by:
        getInputTypeRestriction in interface Algorithm
        Returns:
        Type restriction
      • run

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