optimize greedy ensemble