0
$\begingroup$

I'm expecting the RMSE plot for my KNN regression model to look like the above image but I'm getting the below when running my code hosted here. Any ideas on what could cause this? I believe something is wrong.

expected plot shape [my plot shape

$\endgroup$
0
$\begingroup$

I was calculating mean squared error (lines 50 and 51) by comparing the fitted model with Y, instead of Y hat. When I changed to Y hat, the issue resolved. enter image description here

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.