Airbnb Hosts and Where to Find Them
By: A.Uygur Yiğit
Tags: Machine Learning, Regression, Istanbul, Data Science, Data Analysis

People are always curious about something. Sometimes it is just curiosity sometimes curiosity to action for satisfy this curiosity.

1 week ago i wondered that AirBnb hosts price decisions, house locations and something related to their house properties in Istanbul. For this purpose i made a project which aims to predict listings price in the AirBnb. All of the codes of this project in my GitHub

Here is my outline of the project:

1. Introduction and Questions

2. Modeling & Model Evaluation

3. Summary

Introduction and Questions

In Turkey, AirBnB has been working since 2010. I have never used it due to the fact that I live in İstanbul. However I have some questions before begin my project.

· How many hosts have more than 1 listings?

· Is listing price related to continent or not?

· My House is in European side of Istanbul. Is it good to listing my house in Airbnb?

· Can I predict the listing prices?

Review of the Dataset

With my curiosity, I found a dataset in Official AirBnb web site (Get the Data — Inside Airbnb. Adding data to the debate.)

There are lots of city data which are completely free of charge. When I analyzed the Istanbul Data which was scraped in October 2020, this dataset AirBnb provides 74 Column with 22,328 Rows (listings). Rows represent the listings (room, entire apartment etc.)

Some Columns from the Airbnb Istanbul Dataset

As you can see above, these are very messy data and there are some strings, null values list in cells and so on. I like working with messy data. The summary of the data is that we have categorical and numeric columns. The columns are related to Hosts, Property types, District, some of amenities which is provided by hosts and reviews

I’m not going to talk technical details. If you want to check my project here is my GitHub

Exploratory Data Analysis

After cleaning, transforming process, I have beautiful table for modelling. Before modelling, I need to understand the business and take some correlations between price and other features.

In the AirBnb Istanbul Data set There are 12,651 Unique Host. One host may have multiple listings. Let’s look at the Listing counts per hosts:

Hosts listings Distributions

· As you can see above nearly 80% of hosts have 1 listing in Istanbul. 10% of the hosts have 2 listings and 10% of the hosts have more than 2 listings. This is the one of my questions answer.

· 90% of listings represent Entire home and Private Rooms

District distributions

· AirBnB have nearly %70 of listings in Beyoğlu, Şişli, Fatih, Kadıköy and Beşiktaş.

Istiklal Avenue in Beyoğlu

· These locations are the most famous districts in Istanbul. If you plan visiting Istanbul, you should go to Beyoğlu which is in European Side of Istanbul. There are Taksim Square, Istiklal Avenue, wine houses, clubs, restaurants, cafes, churches, historical passages and buildings… To sum up, Beyoğlu is the harmony of the history and today. For more information: Beyoğlu — Wikipedia

After some univariate exploration Let’s look at the Super Hosts. There are 2,819 (22% of Unique Hosts) Super hosts in AirBnB Istanbul. Most probably people who want to prefer AirBnB find superhosts more reliable to the others.

Superhosts distribution by continent and center districts

· Left barplot above shows that percentage distribution by continent and it indicates Hosts are not super. 80% of listings at European side (10% Superhost, 70% other)

· Right barplot above shows that percentage distribution by centers. I flagged centers manually and these are: Beyoglu, Sisli, Fatih, Besiktas, Sariyer, Kadikoy, Uskudar, Adalar, Beykoz

· I think AirBnB should increase the superhost counts as I mentioned before because people find them more reliable.

After some super host investigation, I’m going to talk about Listings Prices

Price Distribution

· Oops Price is highly right skewed and have extreme points, let’s zoom in

Price Distribution (Zoomed in 0–5000 Turkish Lira)

· The mean of listings price is 511 Turkish Liras and Standard Deviation is 1904 Turkish Liras. Standard deviation is very high. In the next parts I’m going to deal with this skewness problem

Correlation map for some attributes in the Dataset

· If I looked to the correlation heatmap created for host and amenities variables, I’m so sad about the non-relation between the price and the other attributes.

· However, I can detect multicollinearity in the independent variables. I hate multicollinearity and deleted some attributes.

· I’ve done this operation for all attributes but I’m not going to show it here. If you are interested in the operations, let’s check the GitHub.

Continent based price distribution

· European Side has higher price distribution than Asian because most of the popular districts located in European side as I mentioned before and my house is in European side of Istanbul also so that I have high chance to get more than 250TL for my house.

Room type based price distribution

· Price might be depended on the room types. Entire Home/apt and Private Rooms are representing the 90% of the Airbnb listing and their prices distributed differently. This might be good attribute for modelling price

Host tenure distributions

· In Telecom sector, tenure defines the customer lifetime in the company so that I created this feature and gave Tenure name. It represents the host’s lifetime months in the Airbnb as a host.

· Tenure doesn’t differentiate the price but in tenure distribution, it seems there are 2 nearly o normal distribution. I catch that and I’m going to put this attributes in >= 40 Tenure and < 40 Tenure it might be useful for modeling

· Most of the hosts lie between 0–40 Tenure

Modeling & Evaluation

After some insights there is a modeling step. As I said that price is highly skewed. It is the bad thing for regression models.

Transformed price with logarithm

· If I take logarithm of the price, we can catch the normal distribution. So that I think it is better to create a model with logarithmic price

Random Forest Regression Model

After preprocessing I have 35 independent variables for predicting the listings prices. Firstly I created a model RandomForestRegressor from Scikit-Learn package without splitting the data set. This model gave me 0.59 R2 Score but it could be overfitting. My aim is to detect an outlier if any.

First basic model with 0.59 R2 Score

Here you can see the first model result and error distribution (middle). Errors are normally distributed but when the model predict higher prices, the variability is increasing so that I think we can eliminate some variables

Residual Distribution of the first model

· I’m going to eliminate just looking to the box plot and trim from -1.7 and +1.7 points. I lose 237 listings in this operation. Sorry about that…

After I removed the listings as identified extreme values. I split the train and test set for the predicting price and use the model which have same properties

Train set results after outlier detection (0.63 R2 Score)

After modelling, you can see above the result of training set result with 0.63 R2 Score

Train set results after outlier detection (0.56 R2 Score)

I got 0.56 r2 score in the test set. This means our Regression model explain 56% of variability in the price. Feature Importances:

Important feature of the Price prediction

XGBoost Regression:

XGB Regressor Result for the test set (0.60 R2 Score and 0.28 MSE)

· When I try xgboost regressor 0.60 R Squared score and 0.28 MSE on the test set is slightly better than the RandomForestRegressor. Our XGBRegressor model explains the nearly 60% of variability in the data.

Here is the Feature Importance of XGB Model:

Important feature of XGB Regression Model

· It is interesting that my model learned the price from private room attributes. Accommodates also has a big part at this importance.

Summary

For during this project data cleaning and processing taking nearly 70% of all project time. I answered all my questions. Let’s summary that:

· How many hosts have more than 1 listings?

o 20% of the hosts more than 1 listings

80% of the hosts have 1 listing

· Is Continent related to prices?

European side prices are higher than Asian Side

According to the box plot you can see the price distribution for 2 continents and it is obvious european side price is distributing higher than the Asian price distribution.

My House is in European side of Istanbul. Is it good to listing my house in Airbnb?

Entire Home prices have good price for me :)

o I’m going to rent my entire house located in Europe. I have a high chance to get high revenue from my house

o European Side has higher price than Asian Side so yes they are significantly different

· Can I predict the listing prices?

XGB Regression Results on the Test Set

o Yes our model results show that I can explain 60% of price variability with XGBoost Model. With fine tuning it can be increased

What is Next

I need to deploy this model. Maybe creating web app for predicting Airbnb listings from their specifications like accommodates, bathroom, reviews, amenities.

In the next part of this article I’m going to deploy this model to a web app. Because model project which is not deployed haven’t been finished yet.