Menu

Visualizing the Accuracy

Visualizing the Accuracy

A simple bar chart provides a quick visual representation of the model's overall accuracy.

Code

plt.figure(figsize=(5,4))
plt.bar(
["Accuracy"],
[accuracy * 100]
)
plt.ylim(0, 100)
plt.ylabel("Accuracy (%)")
plt.title("Model Accuracy")
plt.show()

Explanation

The height of the bar represents the percentage of correctly classified reviews.