Skip to content

πŸš— KNN Classification for Car Safety | Implements K-Nearest Neighbors (KNN) to classify car safety levels using the Car Evaluation Dataset. Features data preprocessing, feature scaling, and hyperparameter tuning with RandomizedSearchCV, resulting in improved accuracy. πŸ“ŠπŸ”

Notifications You must be signed in to change notification settings

maheshvarade/KNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

K-Nearest Neighbors (KNN) for Car Safety Classification πŸš—

This project implements the K-Nearest Neighbors (KNN) algorithm to classify cars based on safety using the Car Evaluation Dataset from UCI Machine Learning Repository.

πŸ“Œ Features

  • Preprocesses categorical data using Label Encoding.
  • Normalizes features using StandardScaler to improve distance calculations.
  • Implements KNN Classification using Scikit-Learn.
  • Optimizes hyperparameters using RandomizedSearchCV for best results.
  • Evaluates model performance with accuracy, confusion matrix, and classification report.

πŸ“‚ Dataset

  • Source: UCI Machine Learning Repository
  • Attributes:
    • Buying price
    • Maintenance cost
    • Number of doors
    • Passenger capacity
    • Luggage boot size
    • Safety level
    • Class (Target Variable)

Baseline Accuracy (Default KNN): 81.50%

Optimized Accuracy (Using RandomizedSearchCV): 92% πŸš€

About

πŸš— KNN Classification for Car Safety | Implements K-Nearest Neighbors (KNN) to classify car safety levels using the Car Evaluation Dataset. Features data preprocessing, feature scaling, and hyperparameter tuning with RandomizedSearchCV, resulting in improved accuracy. πŸ“ŠπŸ”

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published