EnYa32's picture
Update README.md
cb2162a verified
|
Raw History Blame Contribute Delete
1.67 kB
metadata
title: MobilePriceClassification
emoji: πŸ“±
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 8501
tags:
  - streamlit
pinned: false
short_description: Classifies smartphone price ranges using a KNN model.
license: mit

πŸ“± Smartphone Price Range Classification

This project is a machine learning web application that predicts the price range of a smartphone based on its technical specifications such as RAM, battery power, screen resolution, and connectivity features.

Instead of predicting the exact price, the model classifies smartphones into one of four predefined categories.


🎯 Price Categories

  • 0 – Low Cost
  • 1 – Medium Cost
  • 2 – High Cost
  • 3 – Very High Cost

πŸ€– Model Overview

  • Algorithm: K-Nearest Neighbors (KNN)
  • Preprocessing: StandardScaler
  • Task Type: Multi-class classification
  • Dataset Size: 2,000 smartphones with 20 technical features

The KNN model achieved high accuracy and balanced performance across all price categories.


πŸš€ How the App Works

  1. The user enters smartphone specifications.
  2. The input data is scaled using the same scaler as during training.
  3. The trained KNN model predicts the price range.
  4. The predicted class and label are displayed instantly.

πŸ“‚ Project Files

  • app.py – Streamlit application
  • knn_model.pkl – Trained KNN model
  • knn_scaler.pkl – Fitted StandardScaler
  • knn_features.pkl – Feature names and correct input order
  • requirements.txt – Python dependencies

▢️ Run Locally

pip install -r requirements.txt
streamlit run app.py