Implementation of the calculation of the best features.