O
- Vector type@Reference(authors="Erich Schubert, Remigius Wojdanowski, Arthur Zimek, Hans-Peter Kriegel", title="On Evaluation of Outlier Rankings and Outlier Scores", booktitle="Proc. 12th SIAM Int. Conf. on Data Mining (SDM 2012)", url="https://doi.org/10.1137/1.9781611972825.90", bibkey="DBLP:conf/sdm/SchubertWZK12") public class ComputeKNNOutlierScores<O extends NumberVector> extends AbstractApplication
Since some algorithms can be too slow to run on large data sets and for large values of k, they can be disabled. For example -disable '(LDOF|DWOF|COF|FastABOD)' disables these two methods completely. Alternatively, you can use the parameter -ksquaremax to control the maximum k for these four methods separately.
For methods where k=1 does not make sense, this value will be skipped, and the procedure will commence at 1+stepsize.
Reference:
Erich Schubert, Remigius Wojdanowski, Arthur Zimek, Hans-Peter Kriegel
On Evaluation of Outlier Rankings and Outlier Scores
Proc. 12th SIAM Int. Conf. on Data Mining (SDM 2012)
Modifier and Type | Class and Description |
---|---|
static class |
ComputeKNNOutlierScores.Parameterizer<O extends NumberVector>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
(package private) ByLabelOutlier |
bylabel
By label outlier detection - reference
|
(package private) java.util.regex.Pattern |
disable
Pattern for disabling (skipping) methods.
|
(package private) DistanceFunction<? super O> |
distf
Distance function to use
|
(package private) InputStep |
inputstep
Input step
|
(package private) IntGenerator |
krange
Range of k.
|
(package private) int |
ksquarestop
Maximum k for O(k^2) methods.
|
private static Logging |
LOG
Our logger class.
|
(package private) java.io.File |
outfile
Output file
|
(package private) ScalingFunction |
scaling
Scaling function.
|
REFERENCE, VERSION
Constructor and Description |
---|
ComputeKNNOutlierScores(InputStep inputstep,
DistanceFunction<? super O> distf,
IntGenerator krange,
ByLabelOutlier bylabel,
java.io.File outfile,
ScalingFunction scaling,
java.util.regex.Pattern disable,
int ksquarestop)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isDisabled(java.lang.String name)
Test if a given algorithm is disabled.
|
static void |
main(java.lang.String[] args)
Main method.
|
void |
run()
Runs the application.
|
private void |
runForEachK(java.lang.String prefix,
int mink,
int maxk,
java.util.function.IntFunction<OutlierResult> runner,
java.util.function.BiConsumer<java.lang.String,OutlierResult> out)
Iterate over the k range.
|
(package private) void |
writeResult(java.io.PrintStream out,
DBIDs ids,
OutlierResult result,
ScalingFunction scaling,
java.lang.String label)
Write a single output line.
|
printErrorMessage, runCLIApplication, usage
private static final Logging LOG
final InputStep inputstep
final DistanceFunction<? super O extends NumberVector> distf
final IntGenerator krange
java.io.File outfile
ByLabelOutlier bylabel
ScalingFunction scaling
java.util.regex.Pattern disable
int ksquarestop
public ComputeKNNOutlierScores(InputStep inputstep, DistanceFunction<? super O> distf, IntGenerator krange, ByLabelOutlier bylabel, java.io.File outfile, ScalingFunction scaling, java.util.regex.Pattern disable, int ksquarestop)
inputstep
- Input stepdistf
- Distance functionkrange
- K parameter rangebylabel
- By label outlier (reference)outfile
- Output filescaling
- Scaling functiondisable
- Pattern for disabling methodsksquarestop
- Maximum k for O(k^2) methodspublic void run()
AbstractApplication
run
in class AbstractApplication
void writeResult(java.io.PrintStream out, DBIDs ids, OutlierResult result, ScalingFunction scaling, java.lang.String label)
out
- Output streamids
- DBIDsresult
- Outlier resultscaling
- Scaling functionlabel
- Identification labelprivate void runForEachK(java.lang.String prefix, int mink, int maxk, java.util.function.IntFunction<OutlierResult> runner, java.util.function.BiConsumer<java.lang.String,OutlierResult> out)
prefix
- Prefix stringmink
- Minimum value of k for this methodmaxk
- Maximum value of k for this methodrunner
- Runner to runout
- Output functionprotected boolean isDisabled(java.lang.String name)
name
- Algorithm nametrue
if disabledpublic static void main(java.lang.String[] args)
args
- Command line parameters.Copyright © 2019 ELKI Development Team. License information.