Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Python: Defining a function to predict off a model and calculate it's mean square error

$
0
0

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.

Details of my error


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>