تفاصيل العمل

Airbnb Price Prediction Project

Introduction

This project aims to analyze Airbnb property data and predict rental prices using machine learning techniques. The data was collected, cleaned, visually analyzed, and then predictive models were built to estimate prices based on property and host features.

Workflow Steps

1. Data Import and Preparation

Loaded property data from a CSV file.

Handled missing values and converted numeric columns (such as price and service fee) to proper numeric format.

Dropped irrelevant columns like property ID, host name, geographic location, etc.

2. Exploratory Data Analysis

Displayed statistical summaries of the data.

Plotted distributions of numeric columns such as price, service fee, construction year, etc.

Analyzed categorical columns like room type, cancellation policy, host identity verification status.

3. Handling Missing Values

Removed rows containing missing values to ensure data quality.

4. Encoding Categorical Columns

Converted categorical columns to numeric using LabelEncoder for model compatibility.

5. Building Predictive Models

Split the data into training and testing sets.

Built three models:

Linear Regression

Decision Tree Regressor

Random Forest Regressor

Evaluated model performance using R², MSE, and MAE metrics.

6. Price Prediction

Tested the model on new data and predicted property prices based on their features.

7. Model Saving

Saved the final model using joblib for future use.

Results

Best Model: Random Forest Regressor achieved the highest accuracy (R² > 0.99).

Most Influential Features: Room type, construction year, host status, cancellation policy, service fee.

Price Distribution: Most properties are priced between $200 and $1200.

Service Fee Distribution: Most fees range between $0 and $250.

Visualizations

Price and service fee distribution plots.

Room type and cancellation policy distribution charts.

Correlation matrix of numeric features.

Charts showing the impact of area and host type on price.

Conclusion

This project demonstrates how machine learning can be used to analyze and accurately predict Airbnb property prices. The model can be further improved by including additional features or using more advanced techniques.

️ Desktop Application:

The file airbnb_predictor.py is a desktop application built to allow users to easily interact with the trained model and predict Airbnb rental prices by entering property details.