select best threhold according to information gain