I am working with sklearn.metrics mean_squared_error
and I want to use the mse function in a dataframe.
I want to calculate the mse for each element between two columns from two different df.
When I try this:
mean_squared_error(train_df_test.iloc[:,:1], ideal_df_test.iloc[:,:1])
I simply get one value as a return. I would have expected to get one individual value for each row for 1 column.
Like it would work here:
train_df_test.iloc[:,:1] * ideal_df_test.iloc[:,:1]
Output:
| x | y1|
| ----- | - |
| -20.00| 10|
| -19.99| 20|
What am I doing wrong here?