This project focuses on predicting categories of furniture products using various machine learning regression models. The goal is to evaluate the performance of different models and identify the best one for this task.
The dataset consists of two CSV files:
train.csv: Training data with features and target labels.test.csv: Test data for making predictions.
- Title - F1: A categorical feature representing the title of the furniture product.
- Category - F2: The target variable representing the category of the furniture product.
- Encoding: Categorical variables are encoded using
LabelEncoder. - Imputation: Missing values are handled using
SimpleImputerwith a mean strategy.
The following regression models are implemented and evaluated:
- Linear Regression
- Lasso Regression
- Ridge Regression
- ElasticNet Regression
- Random Forest Regressor
- Gradient Boosting Regressor
The Random Forest model achieved the best performance with a Mean Squared Error (MSE) of 31.99.
- Clone the repository:
git clone https://github.com/MAHMOUD2ABDALLAH/furniture-Sales.git
- Navigate to the project directory:
cd furniture-Sales - Install the required dependencies:
pip install -r requirements.txt
- Run the script:
python main.py
The script includes a function to plot actual vs. predicted values, providing a visual comparison of the model's performance.

- Thanks to the contributors of the
scikit-learnlibrary for providing robust machine learning tools.
- No License Section: Since this was a freelancing task, you don't need to include a license. The project is specific to the task you completed on Upwork.
- Requirements File: Ensure you include a
requirements.txtfile with the necessary libraries, as mentioned earlier. - Example Data: If you can share sample data (or a description of the data format), it will help others understand how to use the script.