@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 extends NumberVector<?>,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 extends NumberVector<?>,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 |
LOG
Our logger class.
|
(package private) int |
maxk
Maximum value of k
|
(package private) File |
outfile
Output file
|
(package private) ScalingFunction |
scaling
Scaling function.
|
(package private) int |
startk
Starting value of k.
|
(package private) int |
stepk
k step size
|
INFORMATION
Constructor and Description |
---|
ComputeKNNOutlierScores(InputStep inputstep,
DistanceFunction<? super O,D> distf,
int startk,
int stepk,
int maxk,
ByLabelOutlier bylabel,
File outfile,
ScalingFunction scaling)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
printErrorMessage, runCLIApplication, usage
private static final Logging LOG
final InputStep inputstep
final DistanceFunction<? super O extends NumberVector<?>,D extends NumberDistance<D,?>> distf
final int startk
final int stepk
final int maxk
File outfile
ByLabelOutlier bylabel
ScalingFunction scaling
public ComputeKNNOutlierScores(InputStep inputstep, DistanceFunction<? super O,D> distf, int startk, int stepk, int maxk, ByLabelOutlier bylabel, File outfile, ScalingFunction scaling)
inputstep
- Input stepdistf
- Distance functionstartk
- Starting value of kstepk
- K step sizemaxk
- Maximum k valuebylabel
- By label outlier (reference)outfile
- Output filescaling
- Scaling functionpublic void run()
AbstractApplication
run
in class AbstractApplication
void writeResult(PrintStream out, DBIDs ids, OutlierResult result, ScalingFunction scaling, String label)
out
- Output streamids
- DBIDsresult
- Outlier resultscaling
- Scaling functionlabel
- Identification labelprivate void runForEachK(ComputeKNNOutlierScores.AlgRunner runner)
runner
- Runner to runpublic static void main(String[] args)
args
- Command line parameters.