// Compute confidence intervals of the experiments
ci = [wilson_score(q, n) for q in results]
ax = plt.subplot()
if param_logscale:
ax.set_xscale("log", nonposx="clip")
ax.errorbar(params, results, yerr=ci, fmt="x-")
ax.set_title("Accuracy vs Hyperparameter")
ax.set_xlabel(param_name)ax.set_ylabel("accuracy")
fac = 0.9
if params[0] < 0:
fac += 0.2
ax.set_xlim(fac * params[0], 1.1 * params[-1])
After Change
plt.xscale("log", nonposx="clip")
plt.errorbar(params, results, yerr=ci, fmt="x-")
plt.title("Accuracy vs Hyperparameter")
plt.xlabel(param_name)
plt.ylabel("accuracy")
fac = 0.9
if params[0] < 0:
fac += 0.2