private boolean pruneData ( ThroughputDistribution priorStats , double forecast ) { boolean prune = false ; // if forecast tput is much greater or much smaller than priorStats, we suspect // priorStats is no longer relevant, so prune it double tputRatio = forecast / priorStats . getMovingAverage ( ) ; if ( tputRatio > tputRatioPruneLevel || tputRatio < ( 1 / tputRatioPruneLevel ) ) { prune = true ; } else { // age & reliability (represented by standard deviation) check int age = controllerCycle - priorStats . getLastUpdate ( ) ; double variability = ( priorStats . getStddev ( ) / priorStats . getMovingAverage ( ) ) ; if ( age * variability > dataAgePruneLevel ) prune = true ; } return prune ; }
Evaluates a ThroughputDistribution for possible removal from the historical dataset .