Spaces:
Sleeping
Sleeping
|
Download README.md from EnYa32/MobilePriceClassification: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/spaces/EnYa32/MobilePriceClassification/resolve/main/README.md
- Command line
-
hf download hf://spaces/EnYa32/MobilePriceClassification/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnYa32/MobilePriceClassification/resolve/main/README.md
1.67 kB
| 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 | |
| ```bash | |
| pip install -r requirements.txt | |
| streamlit run app.py |