I am trying to define a function by first doing prediction off a model and then calculating it's mean squared error.
The function takes in 1 argument, the model name.
I set the name of the variable of the prediction as a variable using the globals() function.
However, I am trying to pass the name of the variable into the mean_squared_error function to calculate the mean squared error and that is when I encountered the error.
Please help.