Skip to content

This project implements KNN Regression on the Auto MPG dataset to predict fuel efficiency (MPG) based on features like horsepower, weight, acceleration, and displacement. πŸ”Ή Key Highlights: Exploratory Data Analysis (EDA): Data cleaning, handling missing values, and correlation heatm

Notifications You must be signed in to change notification settings

maheshvarade/K-Nearest-Neighbors-KNN-for-Regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

K-Nearest Neighbors (KNN) for Regression using Auto MPG Dataset πŸš—πŸ“Š This repository demonstrates K-Nearest Neighbors (KNN) Regression using the Auto MPG dataset. The dataset contains information about fuel efficiency (miles per gallon - MPG) based on features like horsepower, weight, acceleration, and displacement.

πŸ“Œ Features & Workflow Exploratory Data Analysis (EDA) πŸ”

Data cleaning and handling missing values

Feature correlation using a heatmap

Feature Scaling βš–

Applied StandardScaler for optimal KNN performance

KNN Regression Implementation πŸ€–

Used sklearn.neighbors.KNeighborsRegressor

Evaluated with MAE, MSE, RMSE, and RΒ² score Mean Squared Error is : 5.9066975 Root Mean Squared Error is : 2.430369827824564 Mean Absolute Error is : 1.8552499999999998 Accuarcy of knn model is : 89.01415625057032

Hyperparameter Tuning πŸ”§ GridSearchCV Evaluated with RΒ² score Accuarcy of knn model is : 89.01415625057032

RandomizedSearchCV to optimize n_neighbors Accuarcy of knn model is : 0.794548427975116

Improved accuracy with best k-value selection and GridSearchCV has more accuaracy add less MAE

About

This project implements KNN Regression on the Auto MPG dataset to predict fuel efficiency (MPG) based on features like horsepower, weight, acceleration, and displacement. πŸ”Ή Key Highlights: Exploratory Data Analysis (EDA): Data cleaning, handling missing values, and correlation heatm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published