Splitting the data

İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme

Hrant Davtyan

Assistant Professor of Data Science American University of Armenia

Target and features

  • target = churn
  • features = everything else
İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme

Train/test split

  • train - the component used to develop the model
  • test - the component used to validate the model
from sklearn.model_selection import train_test_split

target_train, target_test, features_train, features_test =
                           train_test_split(target,features,test_size=0.25)
İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme

Overfitting

an error that occurs when model works well enough for the dataset it was developed on (train) but is not useful outside of it (test)

İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme

Let's practice!

İK Analitiği: Python ile Çalışan Terkini (Churn) Tahmin Etme

Preparing Video For Download...