Skip to content

Machine learning Freelance project for file prediction on Marketplace prices with the best Machine learning algorithm Classification Techniques

Notifications You must be signed in to change notification settings

MAHMOUD2ABDALLAH/Market-share-prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market Prices Prediction Using Regression Models

This project focuses on predicting market prices using various regression models. The goal is to evaluate the performance of different models and identify the best one for this task. The dataset includes features such as output_own_price, output_comp_price, and output_own_profits, among others.

Dataset

The dataset used in this project is stored in output_data.csv. It contains the following key features:

  • output_date: The date of the market data.
  • mkt_id: The market identifier.
  • output_own_price: The target variable representing the market price.
  • output_comp_price: Competitor's price.
  • output_own_profits: Own profits.

Preprocessing

  • Encoding: Categorical variables (output_date and mkt_id) are encoded using LabelEncoder.
  • Imputation: Missing values are handled using SimpleImputer with a mean strategy.
  • Feature Selection: Features are selected based on their importance using SelectFromModel.

Models

The following regression models are implemented and evaluated:

1. Linear Regression

  • Mean Squared Error (MSE): 0.0663859081668457
  • Best Features: [output_own_cost, output_comp_price]

2. Lasso Regression

  • Mean Squared Error (MSE): 0.0663859081668457
  • Best Features: [output_own_profits]
  • Note: The model shows signs of underfitting.

3. Ridge Regression

  • Mean Squared Error (MSE): 0.06638594717669895
  • Best Features: [output_own_cost, output_comp_price]

4. Elastic Net Regression

  • Mean Squared Error (MSE): 0.12300046352838176
  • Best Features: [output_own_profits]

5. Random Forest Regressor

  • Mean Squared Error (MSE): 0.014679371421792334
  • Best Features: [output_comp_price, output_X]

6. Gradient Boosting Regressor

  • Mean Squared Error (MSE): 0.05191168906110088
  • Best Features: [output_comp_price, output_X]

7. XGBoost Regressor

  • Mean Squared Error (MSE): 0.019841374133488583
  • Best Features: [output_comp_price]

8. Neural Network Regressor

  • Mean Squared Error (MSE): 0.22620928336071672
  • Best Features: [output_comp_price, output_X, output_own_profits]

Results

The Random Forest Regressor achieved the best performance with the lowest Mean Squared Error (MSE) of 0.014679371421792334. The XGBoost Regressor also performed well with an MSE of 0.019841374133488583.

Visualization

The script includes a function to plot actual vs. predicted values, providing a visual comparison of the model's performance. Below are the graphical representations of the models:

  1. Linear Regression:
linear
  1. Lasso Regression:
lasso
  1. Ridge Regression:
ridge
  1. Elastic Net Regression:
elastic net
  1. Random Forest Regressor:
random forest
  1. Gradient Boosting Regressor:
gradient boosting
  1. XGBoost Regressor:
XGB
  1. Neural Network Regressor:
neural network

Usage

  1. Clone the repository:
    git clone https://github.com/MAHMOUD2ABDALLAH/furniture-Sales.git
  2. Navigate to the project directory:
    cd furniture-Sales
  3. Install the required dependencies:
    pip install -r requirements.txt
  4. Run the script:
    python main.py

Dependencies

The project requires the following Python libraries:

  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn
  • xgboost

You can install them using:

pip install pandas numpy scikit-learn matplotlib seaborn xgboost

Acknowledgments

  • Thanks to the contributors of the scikit-learn and xgboost libraries for providing robust machine learning tools.
  • Special thanks to Upwork for the freelancing opportunity.

Key Points:

  1. Model Performance: The README highlights the best-performing models (Random Forest and XGBoost) and their MSE scores.
  2. Visualization: The graphs are linked to the corresponding models for easy reference.
  3. Usage Instructions: Clear steps are provided for running the project.

About

Machine learning Freelance project for file prediction on Marketplace prices with the best Machine learning algorithm Classification Techniques

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages