Package elki.outlier.trivial
Class ByLabelOutlier
- java.lang.Object
-
- elki.outlier.trivial.ByLabelOutlier
-
- All Implemented Interfaces:
Algorithm,OutlierAlgorithm
@Priority(-100) public class ByLabelOutlier extends java.lang.Object implements OutlierAlgorithm
Trivial algorithm that marks outliers by their label. Can be used as reference algorithm in comparisons.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classByLabelOutlier.ParParameterization class.-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PATTERNThe default pattern to use.(package private) java.util.regex.PatternpatternThe pattern we match with.
-
Constructor Summary
Constructors Constructor Description ByLabelOutlier()Constructor.ByLabelOutlier(java.util.regex.Pattern pattern)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutlierResultautorun(Database database)Try to auto-run the algorithm on a database by calling a method calledrun, with an optionalDatabasefirst, and with data relations as specified byAlgorithm.getInputTypeRestriction().TypeInformation[]getInputTypeRestriction()Get the input type restriction used for negotiating the data query.OutlierResultrun(Relation<?> relation)Run the algorithm
-
-
-
Field Detail
-
DEFAULT_PATTERN
public static final java.lang.String DEFAULT_PATTERN
The default pattern to use.- See Also:
- Constant Field Values
-
pattern
final java.util.regex.Pattern pattern
The pattern we match with.
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:AlgorithmGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin interfaceAlgorithm- Returns:
- Type restriction
-
autorun
public OutlierResult autorun(Database database)
Description copied from interface:AlgorithmTry to auto-run the algorithm on a database by calling a method calledrun, with an optionalDatabasefirst, and with data relations as specified byAlgorithm.getInputTypeRestriction().- Specified by:
autorunin interfaceAlgorithm- Specified by:
autorunin interfaceOutlierAlgorithm- Parameters:
database- the database to run the algorithm on- Returns:
- the Result computed by this algorithm
-
run
public OutlierResult run(Relation<?> relation)
Run the algorithm- Parameters:
relation- Relation to process.- Returns:
- Result
-
-