Skip to content

O2sa/dimaond_price_predication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diamond Price Prediction

Welcome to the Diamond Price Prediction repository! This Jupyter Notebook predicts the price of diamonds using machine learning algorithms. The project is built using Python and utilizes four methods for error calculation, both with and without a pipeline. It includes data cleaning, analysis, visualization, normalization, encoding, training, and testing phases. The best result was achieved using the Decision Tree algorithm, with an accuracy of 97%.

Overview

This project aims to predict the price of diamonds based on various features such as carat weight, cut, clarity, color, and depth. It employs machine learning algorithms to train models and make predictions.

Features

  • Machine Learning Algorithms: Utilizes various machine learning algorithms for prediction, including regression models.
  • Error Calculation: Implements four methods for error calculation to evaluate model performance.
  • Pipeline: Demonstrates the use of pipelines for preprocessing data and building machine learning models.

Methods Used

  • Linear Regression
  • Decision Tree Regression
  • Random Forest Regression
  • Support Vector Regression

Methodology

  1. Data Cleaning: Remove any null values or outliers from the dataset.
  2. Data Analysis: Analyze the dataset to understand the relationships between features and the target variable.
  3. Data Visualization: Visualize the data using charts and graphs to gain insights.
  4. Normalization and Encoding: Normalize numerical features and encode categorical features for model training.
  5. Training: Train machine learning models using various algorithms.
  6. Testing: Evaluate the performance of trained models using testing data.

Best Result

The Decision Tree algorithm achieved the best result, with an accuracy of 97%.

Usage

To use this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/o2sa/diamond_price_prediction.git
    
  2. Open the Jupyter Notebook:

    jupyter notebook diamond_price_prediction.ipynb
    
  3. Follow the instructions in the notebook to run the code and make predictions.

Dependencies

This project requires the following dependencies:

  • Python (version)
  • Jupyter Notebook
  • scikit-learn
  • pandas
  • numpy

Install the dependencies using the following command:

pip install scikit-learn pandas numpy

Contributing

Contributions to this project are welcome! If you'd like to contribute, please follow the standard GitHub workflow:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature/new-feature).
  6. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Special thanks to acknowledged_name for inspiration and guidance.