Package elki.outlier.meta
Class ExternalDoubleOutlierScore
- java.lang.Object
-
- elki.outlier.meta.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExternalDoubleOutlierScore.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.Algorithm
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 reparsedstatic java.lang.String
ID_PATTERN_DEFAULT
The default pattern for matching ID lines.private java.util.regex.Pattern
idpattern
object id patternprivate boolean
inverted
Inversion flag.private static Logging
LOG
The logger for this class.private ScalingFunction
scaling
Scaling function to useprivate 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, ScalingFunction scaling)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(Relation<?> relation)
Run the algorithm.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.outlier.OutlierAlgorithm
autorun
-
-
-
-
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
-
scaling
private 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, ScalingFunction scaling)
Constructor.- Parameters:
file
- File to loadidpattern
- Pattern to match IDsscorepattern
- Pattern to match scores withinverted
- Inversion flagscaling
- 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 interfaceAlgorithm
- Returns:
- Type restriction
-
run
public OutlierResult run(Relation<?> relation)
Run the algorithm.- Parameters:
relation
- Relation to use- Returns:
- Result
-
-