private Classifier getBestAdaptiveClassifier ( ) { //take a copy of the ensemble weights (excluding snapshots) Pair [ ] newEnsembleWeights = new Pair [ ensembleWeights . length - MAXPERMANENT ] ; for ( int i = 0 ; i < newEnsembleWeights . length ; i ++ ) newEnsembleWeights [ i ] = ensembleWeights [ i ] ; //sort the weight values Arrays . sort ( newEnsembleWeights , Collections . reverseOrder ( ) ) ; return this . ensemble [ newEnsembleWeights [ 0 ] . index ] . copy ( ) ; }
Returns the adaptive classifier with the highest weight