Aşırı öğrenme ve topluluk yöntemleri

Python ile Finans için Machine Learning

Nathan George

Data Science Professor

aşırı öğrenme

Python ile Finans için Machine Learning

Modelini basitleştir

sınırlı ağ

Python ile Finans için Machine Learning

Sinir ağı seçenekleri

Aşırı öğrenmeyle mücadele seçenekleri:

  • Düğüm sayısını azalt
  • L1/L2 düzenleme kullan
  • Dropout
  • Otokodlayıcı mimarisi
  • Erken durdurma
  • Veriye gürültü ekleme
  • Maksimum norm kısıtları
  • Topluluk yöntemleri
Python ile Finans için Machine Learning

Dropout

dropout

Python ile Finans için Machine Learning

Keras'ta Dropout

from keras.layers import Dense, Dropout

model = Sequential() model.add(Dense(500, input_dim=scaled_train_features.shape[1], activation='relu')) model.add(Dropout(0.5)) model.add(Dense(100, activation='relu')) model.add(Dense(1, activation='linear'))
Python ile Finans için Machine Learning

Test kümesi karşılaştırması

Dropout olmadan AMD'de R$^2$ değerleri:

  • train: 0.91
  • test: -0.72

Dropout ile:

  • train: 0.46
  • test: -0.22
Python ile Finans için Machine Learning

Topluluk yöntemleri

rastgele orman

Python ile Finans için Machine Learning

Topluluk yöntemlerini uygulama

# 2 sinir ağı modelinden tahmin yap
test_pred1 = model_1.predict(scaled_test_features)
test_pred2 = model_2.predict(scaled_test_features)

# Tahminleri yatay istifle ve satırlar boyunca ortalama al test_preds = np.mean(np.hstack((test_pred1, test_pred2)), axis=1)
Python ile Finans için Machine Learning

Topluluğu karşılaştırma

Model 1'in test kümesinde R$^2$ skoru:

  • -0.179

model 2:

  • -0.148

topluluk (ortalama tahminler):

  • -0.146
Python ile Finans için Machine Learning

Dropout ve topluluk!

Python ile Finans için Machine Learning

Preparing Video For Download...