Skip to content

abhipsa14/CaratValue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CaratValue

A Machine Learning project that predicts the price of diamonds based on their physical and quality features such as carat, cut, color, clarity, and dimensions.


📌 Project Overview

Diamond pricing depends on multiple factors like weight, cut quality, clarity, and color. This project builds a regression model that learns from historical diamond data and predicts the price of a diamond based on its characteristics.

The goal of this project is to:

  • Perform data preprocessing and feature engineering
  • Train machine learning regression models
  • Evaluate model performance
  • Deploy or test predictions

📊 Dataset Description

The dataset contains the following features:

  • carat – Weight of the diamond
  • cut – Quality of the cut (Fair, Good, Very Good, Premium, Ideal)
  • color – Diamond color grade (D to J)
  • clarity – Clarity grade (I1, SI2, SI1, VS2, VS1, VVS2, VVS1, IF)
  • depth – Total depth percentage
  • table – Width of top of diamond relative to widest point
  • x, y, z – Dimensions (mm)
  • price – Price in USD (Target variable)

🛠️ Tech Stack

  • Python
  • NumPy
  • Pandas
  • Scikit-learn
  • Matplotlib / Seaborn
  • (Flask if deployed)

🚀 Installation & Setup

  1. Clone the repository
git clone https://github.com/abhipsa14/diamond_price_prediction.git
cd diamond_price_prediction
  1. Create a virtual environment (recommended)
python -m venv venv
  1. Activate the environment

Windows:

venv\Scripts\activate

Mac/Linux:

source venv/bin/activate
  1. Install required dependencies
pip install -r requirements.txt

▶️ How to Run

If using Jupyter Notebook:

jupyter notebook

Open the notebook and run all cells.

If running as a Python script:

python main.py

If deployed using Flask:

python app.py

Then open:

http://127.0.0.1:5000/

📈 Model Evaluation

The model performance is evaluated using:

  • Mean Absolute Error (MAE)
  • Mean Squared Error (MSE)
  • Root Mean Squared Error (RMSE)
  • R² Score

📌 Project Structure

diamond_price_prediction/
│
├── data/
├── notebooks/
├── src/
├── app.py
├── requirements.txt
└── README.md

🎯 Future Improvements

  • Hyperparameter tuning
  • Model comparison
  • Deployment on cloud (AWS / Render / Railway)
  • Adding CI/CD pipeline
  • Creating a proper frontend UI

About

Machine Learning project that project that predicts the price of diamonds based on their physical and quailty features such as carat, cut, color, clarity and dimensions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors