Version information: Updated for ELKI 0.6.5~20141030
The simples API for accessing ELKI results is the ResultHandler API.
In this tutorial, we will implement a custom result handler to output data in our preferred custom format.
Implementing the interface yields the following template stub:
Finding Outlier Results
For this example, we want to access the result of an outlier detection algorithm. First of all, we will need to scan the current result tree for appropriate outlier detection results. Fortunately, the ResultUtil class already implements this job for us:
Accessing the scores
Our output format will be a simple list of object id and outlier scores. For this we just iterate over all objects, print their ID and score:
Putting it all together
The complete class looks like this:
The class should show up automatically in the -resulthandler choices of the UI.
Since there is an implicit parameterless public constructor, it can automatically be instantiated, and we do not have to add an Parameterizer.