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 class
ByLabelOutlier.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
DEFAULT_PATTERN
The default pattern to use.(package private) java.util.regex.Pattern
pattern
The 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 OutlierResult
autorun(Database database)
Try to auto-run the algorithm on a database by calling a method calledrun
, with an optionalDatabase
first, and with data relations as specified byAlgorithm.getInputTypeRestriction()
.TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(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:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
autorun
public OutlierResult autorun(Database database)
Description copied from interface:Algorithm
Try to auto-run the algorithm on a database by calling a method calledrun
, with an optionalDatabase
first, and with data relations as specified byAlgorithm.getInputTypeRestriction()
.- Specified by:
autorun
in interfaceAlgorithm
- Specified by:
autorun
in 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
-
-