In the notebook M4.01, in the MAE (or MSE) function you calculate the error as
errors = np.ravel(true_values) - np.ravel(predictions)
because true_values has shape (342,) and prediction (342,1), it depends from
data, target = penguins[[feature_name]], penguins[target_name]
Why you don’t use the pandas Series penguins[feature_name]?
I thought to fix the concepts:
data → DataFrame
target → Vector
or are there other reasons?
Thanks in advance