https://github.com/sureshbeekhani/gemstone-price-prediction
The Gemstone Price Prediction project aims to predict gemstone prices using a machine learning approach. The project involves various steps such as data ingestion, transformation, model training, and deploying the model through a Flask web application.
https://github.com/sureshbeekhani/gemstone-price-prediction
data-science machine-learning predictive-modeling regression-analysis
Last synced: over 1 year ago
JSON representation
The Gemstone Price Prediction project aims to predict gemstone prices using a machine learning approach. The project involves various steps such as data ingestion, transformation, model training, and deploying the model through a Flask web application.
- Host: GitHub
- URL: https://github.com/sureshbeekhani/gemstone-price-prediction
- Owner: SURESHBEEKHANI
- License: other
- Created: 2024-10-20T05:03:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-14T05:35:14.000Z (over 1 year ago)
- Last Synced: 2025-02-02T08:13:21.849Z (over 1 year ago)
- Topics: data-science, machine-learning, predictive-modeling, regression-analysis
- Language: Jupyter Notebook
- Homepage: https://sureshbeekhani-gemstone-price-prediction.hf.space/
- Size: 15.3 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gemstone Price Prediction - Suresh beekhani
### Introduction About the Data :
**The dataset** The goal is to predict `price` of given diamond (Regression Analysis).
There are 10 independent variables (including `id`):
* `id` : unique identifier of each diamond
* `carat` : Carat (ct.) refers to the unique unit of weight measurement used exclusively to weigh gemstones and diamonds.
* `cut` : Quality of Diamond Cut
* `color` : Color of Diamond
* `clarity` : Diamond clarity is a measure of the purity and rarity of the stone, graded by the visibility of these characteristics under 10-power magnification.
* `depth` : The depth of diamond is its height (in millimeters) measured from the culet (bottom tip) to the table (flat, top surface)
* `table` : A diamond's table is the facet which can be seen when the stone is viewed face up.
* `x` : Diamond X dimension
* `y` : Diamond Y dimension
* `x` : Diamond Z dimension
Target variable:
* `price`: Price of the given Diamond.
Dataset Source Link :
[https://www.kaggle.com/competitions/playground-series-s3e8/data?select=train.csv](https://www.kaggle.com/competitions/playground-series-s3e8/data?select=train.csv)
### It is observed that the categorical variables 'cut', 'color' and 'clarity' are ordinal in nature
# Deployment Link :
link : [https://sureshbeekhani-gemstone-price-prediction.hf.space/](https://sureshbeekhani-gemstone-price-prediction.hf.space/)
# Screenshot of UI
# YouTube Video Link
Link for YouTube Video : Click the below thumbnail to open

# Approach for the project
1. Data Ingestion :
* In Data Ingestion phase the data is first read as csv.
* Then the data is split into training and testing and saved as csv file.
2. Data Transformation :
* In this phase a ColumnTransformer Pipeline is created.
* for Numeric Variables first SimpleImputer is applied with strategy median , then Standard Scaling is performed on numeric data.
* for Categorical Variables SimpleImputer is applied with most frequent strategy, then ordinal encoding performed , after this data is scaled with Standard Scaler.
* This preprocessor is saved as pickle file.
3. Model Training :
* In this phase base model is tested . The best model found was catboost regressor.
* After this hyperparameter tuning is performed on catboost and knn model.
* A final VotingRegressor is created which will combine prediction of catboost, xgboost and knn models.
* This model is saved as pickle file.
4. Prediction Pipeline :
* This pipeline converts given data into dataframe and has various functions to load pickle files and predict the final results in python.
5. Flask App creation :
* Flask app is created with User Interface to predict the gemstone prices inside a Web Application.
# Exploratory Data Analysis Notebook
Link : [EDA Notebook](./notebook/1_EDA_Gemstone_price.ipynb)
# Model Training Approach Notebook
Link : [Model Training Notebook](./notebook/2_Model_Training_Gemstone.ipynb)
# Model Interpretation with LIME
Link : [LIME Interpretation](./notebook/3_Explainability_with_LIME.ipynb)