Reviews on Guided Project-Predicting car prices

Kindly check the project for all the decisions taken for the prediction models and the k-fold cross-validation.

.py file:
Predicting Car (13.7 KB)

.ipynb file
car price predictions.ipynb (3.1 MB)

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

1 Like

Hi Ananya,

Could you please reload your project in ipynb format? Otherwise I can’t open it for reviewing. Thank you!

Uploaded the ipynb file. But, after conversion from .py to .ipynb using pypy it will have whole code in single cell itself.

Any feedback on the project?

Hi Ananya,

It wasn’t easy following your project because of this conversion and all the outputs gathered at the end of the giant code cell. Next time you can consider sharing it as a Jupyter notebook, it would be much easier both for you to share and for the readers to review.

Anyway, here is my feedback.

  • Please add a title and a conclusion to your project.
  • You can import several functions from the same module in one line code:
from sklearn.model_selection import KFold, cross_val_score
  • You imported matplotlib.pyplot twice by mistake.
  • It’s better to make code comments as laconic as possible, or even just to remove them, if they are rather obvious (consider, for example, reducing the following ones: # let’s see few starting rows of dataframe, # Now we have all numeric data in our data thus we can convert it all to numeric by astype, # let us check out other columns also for missing values and take appropriate action)
  • Scatter plots: since the code is identical, it’s better to create a function for them.
  • The commented out code should be removed (except for very rare cases) # print(normalized_cars_df.shape).
  • You might consider despining the plots where possible, increasing title and axis label fonts.

Hopy my suggestions were helpful. Good luck with your future projects!

1 Like

Sorry for the inconvenience, and thanks a lot for all these important points.

1 Like