实战:
def print_best_score(gsearch,param_test):
# 输出best score
print("Best score: %0.3f" % gsearch.best_score_)
print("Best parameters set:")
# 输出最佳的分类器到底使用了怎样的参数
best_parameters = gsearch.best_estimator_.get_params()
for param_name in sorted(param_test.keys()):
print("\t%s: %r" % (param_name, best_parameters[param_name]))
params = {
'depth': [4, 6, 10],
'learni