Today, I wanted to mess around with something called “over and under prediction” in machine learning. It’s basically checking if your model is guessing too high or too low compared to the real answers.

So, first, I grabbed a dataset. I think it was about house prices, with stuff like size, location, and how many bathrooms it had. You know, the usual.
Then, I split the data into two parts: one for training the model and one for testing it. It’s like teaching a kid with some examples and then giving them a quiz to see how well they learned.
Building the Model
I picked a simple model, something called linear regression. I’m not a pro, so I didn’t want anything too fancy. I just wanted to see the over and under prediction part in action.
Next, I trained the model. It’s like showing the model the training data and letting it figure out the patterns. This part took a little while, like waiting for a pot of water to boil.
Testing the Model
Once the model was trained, I fed it the testing data. This is the “quiz” part. The model made its predictions on the house prices, based on what it learned from the training data.

Now, the fun part! I compared the model’s predictions to the actual house prices in the testing data.
- If the model predicted higher than the actual price, that was an over-prediction.
- If it predicted lower, that was an under-prediction.
Seeing the Results
I made a simple chart to visualize this. It was pretty cool to see where the model was consistently guessing too high or too low. For example, maybe it kept overestimating the price of houses in a certain neighborhood, or underestimating the price of bigger houses.
This whole thing helped me understand how well the model was working and where it was going wrong. It’s like figuring out if your friend is always exaggerating or downplaying things. You get to know their quirks!
It was a good learning experience. I’m not claiming to be an expert, but I think I get the basic idea of over and under prediction now. Maybe next time I’ll try a more complicated model and see how it goes!