Predicting car prices using k nearest neighbors

Hello DQ,
In an earlier project @artur.sannikov96 pointed me to the pandas/numpy docstring style and so I tried to improve on that. I’m sharing my project on the car price prediction and I applied the feed back I received , I hope I did better this time.

here is my last mssion screen Learn data science with Python and R projects

carprices.ipynb (163.3 KB)

Click here to view the jupyter notebook file in a new tab

2 Likes

Hi @abomayesan, I’m glad that my feedback was useful for the improvement of your project :slight_smile: Overall, I liked your project, especially your conclusions which demonstrated that you are not afraid of negative results and are able to propose solutions to potentially predict the car prices! I won’t comment a lot on your machine learning solutions as I have only very basic knowledge of this topic but I want to say a few things about other aspects of your project:

  • Maybe you should explain why you’ve chosen those specific functions from scikit-learn
  • Your plots lack x and y labels, which makes them difficult to read
  • You have a few typos in your text
  • For the normalization, you can also use the MinMaxScaler method
  • Well done on implementing function docstrings but the style does not follow the conventions. I will list these issues below
  • For instance, you should use three double-quotes
  • Next, the summary of the function should occupy one line and start with an infinitive verb (even though I would not stick to it too strictly)
  • Don’t forget to capitalize the sentences in the “Returns” section
  • df : DataFrame - you should use the name of the package before the data type if it’s not from the base Python, for example pd.DataFrame
  • Finally, I myself always miss the spaces before the parameter and output names, so well done on noticing this small aspect :slight_smile:
  • Here’s a good tutorial on pandas doctrings style

That’s it from my side. I would appreciate if other more experienced in ML learners could comment on your algorithmic part.

Happy coding!

3 Likes

Thank you. @artur.sannikov96 I’m going to implement the corrections you’ve pointed out for me.

2 Likes