Use the cross-entropy method to optimize weights of features.