Machine learning algorithms can be classified according to
The boundary between the two types can be blured:
Example: predicting final grade $g_4$ of a student given their 1st, 2nd and 3rd year result $g_1$, $g_2$ and $g_3$.
model-based:
$$ g_4 = c_1 g_1 + c_2 g_2 +c_3 g_3$$