https://github.com/itskshitija/diamond-price-prediction-project
The primary goal of this project is to create a machine-learning model capable of predicting diamond prices. The dataset includes various diamond characteristics, and multiple regression models are trained and evaluated to select the best one based on the R² score.
https://github.com/itskshitija/diamond-price-prediction-project
decision-tree-classifier ml prediction-model price-prediction supervised-machine-learning unsupervised-machine-learning
Last synced: 3 months ago
JSON representation
The primary goal of this project is to create a machine-learning model capable of predicting diamond prices. The dataset includes various diamond characteristics, and multiple regression models are trained and evaluated to select the best one based on the R² score.
- Host: GitHub
- URL: https://github.com/itskshitija/diamond-price-prediction-project
- Owner: itskshitija
- Created: 2025-01-17T06:24:41.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-07T13:32:12.000Z (7 months ago)
- Last Synced: 2025-03-07T14:28:45.025Z (7 months ago)
- Topics: decision-tree-classifier, ml, prediction-model, price-prediction, supervised-machine-learning, unsupervised-machine-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 8.18 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 💎 **Diamond Price Prediction**
This project is focused on predicting the price of diamonds based on various features like **carat weight**, **cut quality**, **color**, **clarity**, and other attributes. By applying machine learning models, we aim to predict the price of a diamond using its characteristics, providing valuable insights into what influences diamond pricing.
## 🔍 **Project Overview**
The primary goal of this project is to create a machine-learning model capable of predicting diamond prices. The dataset includes various diamond characteristics, and multiple regression models are trained and evaluated to select the best one based on the R² score. The **Decision Tree Regressor** was found to be the best performing model for this task.
## 🛠️ **Technologies Used**
- **Python 3.x**
- Libraries:
- `numpy` - For numerical operations
- `pandas` - For data manipulation and analysis
- `scikit-learn` - For machine learning models and model evaluation
- `matplotlib` & `seaborn` - For data visualization
- `joblib` - For model serialization
- Machine Learning Algorithms:
- **Linear Regression**
- **Lasso Regression**
- **Ridge Regression**
- **ElasticNet Regression**
- **Decision Tree Regressor** *(Best Performing Model)*
## 🔖Dataset
The diamond_data.csv file contains information about diamonds, including the following features:
- Carat
- Cut
- Color
- Clarity
- Price (target variable)## 2️⃣ **Model Training**
To train the model, simply run the training script, which evaluates multiple regression models and selects the best one based on the R² score. In this case, the **Decision Tree Regressor** was selected as the best model based on performance.
## 3️⃣ **Making Predictions**
Once the model is trained, you can use it to predict the price of a diamond based on new input data.
## 4️⃣ **Model Evaluation**
The project evaluates different regression models using various performance metrics to select the most accurate model. The following evaluation metrics were used:
- **RMSE (Root Mean Squared Error):** Measures the average magnitude of the error in the model's predictions.
- **MAE (Mean Absolute Error):** Provides the average absolute difference between predicted and actual values.
- **R² Score:** Indicates how well the model explains the variance in the target variable.## 📦 **Installation**
To set up the project on your local machine, follow these steps:
### Step 1: Clone the Repository
```bash
git clone https://github.com/itskshitija/Diamond-Price-Prediction.git
```### Step 2: Install Dependencies
```bash
pip install -r requirements.txt
```## ⛳Final Output
