@ Override public OutlierResult run ( Database db , Relation < V > relation ) { DBIDs ids = relation . getDBIDs ( ) ; WritableDoubleDataStore abodvalues = DataStoreUtil . makeDoubleStorage ( ids , DataStoreFactory . HINT_STATIC ) ; DoubleMinMax minmaxabod = new DoubleMinMax ( ) ; if ( kernelFunction . getClass ( ) == LinearKernelFunction . class ) { if ( ! kNNABOD ( db , relation , ids , abodvalues , minmaxabod ) ) { // Fallback, if we do not have an index. fastABOD ( db , relation , ids , abodvalues , minmaxabod ) ; } } else { fastABOD ( db , relation , ids , abodvalues , minmaxabod ) ; } // Build result representation. DoubleRelation scoreResult = new MaterializedDoubleRelation ( "Angle-Based Outlier Degree" , "abod-outlier" , abodvalues , relation . getDBIDs ( ) ) ; OutlierScoreMeta scoreMeta = new InvertedOutlierScoreMeta ( minmaxabod . getMin ( ) , minmaxabod . getMax ( ) , 0.0 , Double . POSITIVE_INFINITY ) ; return new OutlierResult ( scoreMeta , scoreResult ) ; }
Run Fast - ABOD on the data set .