
@Reference(authors="E. Schubert, R. Wojdanowski, A. Zimek, H.-P. Kriegel", title="On Evaluation of Outlier Rankings and Outlier Scores", booktitle="Proc. 12th SIAM International Conference on Data Mining (SDM), Anaheim, CA, 2012.") public class ComputeKNNOutlierScores<O,D extends NumberDistance<D,?>> extends AbstractApplication
E. Schubert, R. Wojdanowski, A. Zimek, H.-P. Kriegel
On Evaluation of Outlier Rankings and Outlier Scores
In Proceedings of the 12th SIAM International Conference on Data Mining
(SDM), Anaheim, CA, 2012.
| Modifier and Type | Class and Description |
|---|---|
private static interface |
ComputeKNNOutlierScores.AlgRunner
Run an algorithm for a given k.
|
static class |
ComputeKNNOutlierScores.Parameterizer<O,D extends NumberDistance<D,?>>
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) ByLabelOutlier |
bylabel
By label outlier detection - reference
|
(package private) DistanceFunction<? super O,D> |
distf
Distance function to use
|
(package private) InputStep |
inputstep
Input step
|
private static Logging |
logger
Our logger class.
|
(package private) int |
maxk
Maximum value of k
|
(package private) File |
outfile
Output file
|
(package private) boolean |
runabod
Include ABOD in the experiments.
|
(package private) int |
startk
Starting value of k.
|
(package private) int |
stepk
k step size
|
INFORMATION, INPUT_ID, OUTPUT_ID, STATIC_LOGGER| Constructor and Description |
|---|
ComputeKNNOutlierScores(boolean verbose,
InputStep inputstep,
DistanceFunction<? super O,D> distf,
int startk,
int stepk,
int maxk,
ByLabelOutlier bylabel,
File outfile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
detachResult(Database database,
OutlierResult discardresult)
Avoid that (future changes?)
|
static void |
main(String[] args)
Main method.
|
void |
run()
Runs the application.
|
private void |
runForEachK(ComputeKNNOutlierScores.AlgRunner runner)
Iterate over the k range.
|
(package private) void |
writeResult(PrintStream out,
DBIDs ids,
OutlierResult result,
ScalingFunction scaling,
String label)
Write a single output line.
|
isVerbose, printErrorMessage, runCLIApplication, usageprivate static final Logging logger
final InputStep inputstep
final DistanceFunction<? super O,D extends NumberDistance<D,?>> distf
final int startk
final int stepk
final int maxk
File outfile
ByLabelOutlier bylabel
boolean runabod
public ComputeKNNOutlierScores(boolean verbose,
InputStep inputstep,
DistanceFunction<? super O,D> distf,
int startk,
int stepk,
int maxk,
ByLabelOutlier bylabel,
File outfile)
verbose - Verbose flaginputstep - Input stepdistf - Distance functionstartk - Starting value of kstepk - K step sizemaxk - Maximum k valuebylabel - By label outlier (reference)outfile - Output filepublic void run()
AbstractApplicationrun in class AbstractApplicationvoid detachResult(Database database, OutlierResult discardresult)
database - Databasediscardresult - Result to discard.void writeResult(PrintStream out, DBIDs ids, OutlierResult result, ScalingFunction scaling, String label)
out - Output streamids - DBIDsresult - Outlier resultscaling - Scaling function.label - Identification labelprivate void runForEachK(ComputeKNNOutlierScores.AlgRunner runner)
runner - Runner to runpublic static void main(String[] args)
args - Command line parameters.