public DataStore < M > preprocess ( Class < ? super M > modelcls , Relation < O > relation , RangeQuery < O > query ) { WritableDataStore < M > storage = DataStoreUtil . makeStorage ( relation . getDBIDs ( ) , DataStoreFactory . HINT_HOT | DataStoreFactory . HINT_TEMP , modelcls ) ; Duration time = getLogger ( ) . newDuration ( this . getClass ( ) . getName ( ) + ".preprocessing-time" ) . begin ( ) ; FiniteProgress progress = getLogger ( ) . isVerbose ( ) ? new FiniteProgress ( this . getClass ( ) . getName ( ) , relation . size ( ) , getLogger ( ) ) : null ; for ( DBIDIter iditer = relation . iterDBIDs ( ) ; iditer . valid ( ) ; iditer . advance ( ) ) { DoubleDBIDList neighbors = query . getRangeForDBID ( iditer , epsilon ) ; storage . put ( iditer , computeLocalModel ( iditer , neighbors , relation ) ) ; getLogger ( ) . incrementProcessed ( progress ) ; } getLogger ( ) . ensureCompleted ( progress ) ; getLogger ( ) . statistics ( time . end ( ) ) ; return storage ; }
Perform the preprocessing step .