In traditional programming, correctness is measured by whether the program follows exact rules and produces the expected output every time. The main metric is accuracy of the program logic.
In machine learning, the program learns from data and makes predictions. Here, metrics like accuracy, precision, recall, and F1 score matter because predictions can be right or wrong with some uncertainty.
We use these metrics to understand how well the ML model generalizes beyond the training data, unlike traditional programs that follow fixed rules.
