Wrong Predictions

I am getting wrong predictions for every QueryPoint X.

Hey @nipulagarwal_09,
Can your please provide the link to your .ipynb file. So that i can have look and understand if by mistake you have implemented something wrong and provide you suggestions on base of that.

How to provide that link I am actually using Jupyter Notebook

You can upload your notebook on google drive and share its link to view.
Or else you can upload it on google colab and share its link with me.

you can choose whichever your are comfortable with.

https://drive.google.com/open?id=1yq-D9Um3SpHen7LnHkPBqiWh2Wy15k94

here is the google drive link

Okay. Let me just have a look.
Thank you. Will be replying you soon.

hey @nipulagarwal_09 ,
Your code is working is all fine and also providing nice results. Just have look at this code file. I have just updated your the code that you have provided to me and also explained in brief how can we estimate how our model working .

The code is working fine but why the score is in the range of 55-60.
and what is the use of iterrows

df.iterrows() it is a function that called to iterate over all the rows of a dataframe return index value,row at each iteration. Now to generate predictions with the function that you had made , we need to pass an array of values , hence we need to iterate over the test data rows to generate those individual arrays of values for prediction. Hence I have used iterrows for that.

There is no particular reason for that. For given value of k and other parameters your model is working as such . So you need try some other features to improve your model performance , like varying values of K , scaling features ,proper feature selection and feature extraction , if possible any. These will help you to improve your model. See the thing is , making a model is easy but tuning it to get best results on unseen data is the major difficult part in machine learning.

Ok , I understand …Thanks a lot.

Kindly mark this doubt as resolved , if haven’t marked it yet and also kindly provide your valuable feedback as it help us to provide you with better learning experience and help in improving this platform.

Thank You, Happy Learning :slight_smile:.