Coder Social home page Coder Social logo

weichi21 / knn-model-car-price-prediction Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 448 KB

Predictive modeling project by implementing KNN regression model.

Jupyter Notebook 100.00%
data-cleansing data-transformation knn-regression machine-learning predictive-modeling python scikit-learn selectkbest feature-engineering feature-extraction

knn-model-car-price-prediction's Introduction

Car Price Prediction by Using K-nearest-neighborhood (KNN) Regression Model

  • Objective: Explore the best numeric feature subset and K-value for car price prediction.

Dataset is from 1985 Ward's Automotive Yearbook
Available from: https://archive.ics.uci.edu/dataset/10/automobile

Here I implemented:

  1. Data Cleansing and Data Transformation
  2. Univariate KNN model with single K-value
  3. Univariate KNN model with multiple K-values (Hyperparameter Tuning)
  4. Multivariate KNN model with single K-Value
  5. Multivariate KNN model with multiple K-Values (Hyperparameter Tuning & K-Fold Cross-Validation)

Conclusion

  • Best Feature Subset: ['city-mpg', 'wheel-base', 'curb-weight', 'highway-mpg', 'peak-rpm']
    Best k Value: 1
    Best Average Accurcy: 86.43%

Future Step

  • With the multivariate KNN hyperparameter tuning, we used f_regression scoring function for best feature subset selection.
    However, f_regression only examines the linear relationship between features and target, and return p-value.
  • We can further apply Mutual Information function from Scikit-learn for feature selection, to see if non-linear results can make the prediction better.
  • We only used numerical features for prediction. It is interesting to explore how combinations of categorical and numeric features ​​can achieve better accuracy by implementing One-Hot Encoding.

knn-model-car-price-prediction's People

Contributors

weichi21 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.