Pythonla Regresyon Modeli Uyguluyorum: Ev Fiyat Tahmini
Yeni medium yazıma hoş geldiniz!
2020'nin son zamanlarında, keyifle inceleyebileceğiniz bolca grafik görselleriyle oluşturduğum yazımı paylaşıyorum. Bu yazımda, pythonla çeşitli regresyon yöntemleri kullanarak konut fiyatlarını tahmin etmeye çalışıyorum. Bunu başarmak için çok çeşitli yöntemler var ve her yöntemin kendine has artıları olabiliyor. Bence, “regresyon” en önemli yöntemlerden biri çünkü bize veriler hakkında çok fazla fikir verebiliyor. Değişkenler arasındaki ilişkiyi yorumlamamızı kolaylaştırıyor. Görselleri oluşturduğum kodlarını da detay kısımlarına ekledim. Üzerinde çalışacağım veri kümesi için en iyi regresyonu bulmak için gerçekleştirdiğim işlemleri beraber inceleyelim.
Gerekli Kütüphanelerin Yüklenmesi
📈 Veri Okuma
Korelasyon vazgeçilmezim
Korelasyon ilk 10'da durum nasıl?
2009 yılında evlerin en çok; 2010 yılında ise evlerin en az satıldığı yıl olduğunu görüyoruz.
🎀 Veri Hazırlama
Outlier’da kırmızı kartsız olmaz :)
⚡️ Kayıp veri (missing data)
🔨 Yeni özellikler oluşturuyorum
✈️ Özelliği Transfer Et
features['OverallCond'] = features['OverallCond'].astype(str)
features['MSSubClass'] = features['MSSubClass'].astype(str)
features['YrSold'] = features['YrSold'].astype(str)
features['MoSold'] = features['MoSold'].astype(str)
from scipy.special import boxcox1p
skewed_features = skewness.index
lam = 0.15
for cols in skewed_features:
features[cols] = boxcox1p(features[cols], lam)
🏆 Final
Lasso
Lightgbm
Gradient Boosting
LGBM
ElasticNet
📊 Skor ❓
İlgili detay kodlara ve diğer çalışmalarım için github.com/hatice1 ve researchgate.net/profile/Hatice_Dagaslani hesaplarımdan ulaşabilirsiniz.
Yeni yazımda görüşmek üzere.
Saygılarımla,
Hatice Dağaslanı
dagaslani@itu.edu.tr
“You can’t connect the dots looking forward; you can only connect them looking backwards.” Steve Jobs