plt.axhline(0.5, color="r", alpha=0.5, label="Descision threshold")
plt.xlabel("Time")
plt.axis("tight")
plt.legend()
plt.tight_layout()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// which looks much like the first plot, but with the decision threshold
After Change
fig, ax = plt.subplots()
ax.plot(times, p, label="P[V=1|x]")
ax.axhline(0.5, color="r", alpha=0.5, label="Descision threshold")
ax.set(xlabel="Time")
ax.legend();
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// which looks much like the first plot, but with the decision threshold