← Back to list

Airbnb İstanbul

In this project, it is desired to estimate the price of Airbnb’s under 3000 TL(Turkish Lira) in İstanbul.

Taner Ant · 2023-01-24 13:08 · 4 claps · 2.1 min read
#airbnb #istanbul #backpacking #random-forest-regressor #feature-engineering
Open on Medium ↗
Wiki topics: 🏔️ · Outdoor & Adventure

Airbnb İstanbul

In this project, it is desired to estimate the price of Airbnb’s under 3000 TL(Turkish Lira) in İstanbul.

The raw data consists of 74 variables. Removed unused data such as ‘picture_id,url_id,description’. In total there are 30 variables left. Missing data (NaN) was deleted because the dataset was large enough.

Target variable distribution graph

Target variable distribution graph

I mapped the districts of Istanbul into two as the European and the Anatolian side.

Chart showing the average price difference between the european and anatolian side.

Avrupa yakası(European side) , Anadolu yakası (Anatolian side)

Avrupa yakası(European side) , Anadolu yakası (Anatolian side)

As the number of people staying up to 7 people increases, the price increases.

Average prices, shared rooms lower and private rooms as expected.

Since ‘amenities ’variable consists of a string list, I created a new feature consisting of the sum of the values in the list. There’s probably an easier solution to this, but I couldn’t find it. :)

for i in range(len(df['amenities'])):
    df['amenities_count'][i-1:i] = df['amenities'][i-1:i].str.split(',').explode().str.strip('[] ').value_counts().sum()

Correlation heatmap

Correlation heatmap

Simple view of tree chart (max_depth = 2)

Simple view of tree chart (max_depth = 2)

Result

Random forest model results.

RMSE : 384.245

r2_score : 0.615

It can be said that the explanatory value of the dependent variable of the independent variables is approximately % 61.5.

The RMSE is quite high because the model is created for all house and room types.

Sources

[embed]Get the Data Adding data to the debateinsideairbnb.com

[embed]GitHub - tanerant/Airbnb_Istanbul You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…github.com


메타데이터
post_id
1cc0d19be06b
slug
airbnb-i̇stanbul-1cc0d19be06b
url
https://medium.com/@tanerant/airbnb-i%CC%87stanbul-1cc0d19be06b
canonical_url
https://medium.com/@tanerant/airbnb-i%CC%87stanbul-1cc0d19be06b
author_url
https://medium.com/@tanerant
status
ok
fetched_at
2026-07-26 05:38:51