private double computeStabilityIndex ( ) { int m = ( int ) Math . floor ( ( this . ensemble . length - MAXPERMANENT ) / 2 ) ; int [ ] [ ] votes = new int [ m ] [ tau_size ] ; double errors = 0 ; int count = 0 ; Pair [ ] arr = getHalf ( true ) ; for ( int i = 0 ; i < m ; i ++ ) { for ( int j = 0 ; j < tau_size ; j ++ ) { votes [ i ] [ j ] = Utils . maxIndex ( this . ensemble [ arr [ i ] . index ] . getVotesForInstance ( recentChunk . get ( j ) ) ) ; errors += ( votes [ i ] [ j ] == ( int ) this . recentChunk . get ( j ) . classValue ( ) ) ? 0 : 1 ; count ++ ; } } errors = errors / count ; double res = 0 ; count = 0 ; for ( int i = 0 ; i < m ; i ++ ) for ( int j = i + 1 ; j < m ; j ++ ) if ( i != j ) { res += computeKappa ( votes [ i ] , votes [ j ] ) ; count ++ ; } return res / count - errors ; }
Returns the stability index of the adaptive ensemble of classifiers . The ensemble is considered stable here if its diversity level and error rates are low .