Rozhodování o počtu proměnných

Introduction to Predictive Analytics in Python

Nele Verbiest, Ph.D

Data Scientist @PythonPredictions

Vyhodnocení AUC

auc_values = []
variables_evaluate = []

for v in variables_forward:
    variables_evaluate.append(v)
    auc_value = auc(variables_evaluate, ["target"], basetable)
    auc_values.append(auc_value)
Introduction to Predictive Analytics in Python

Vyhodnocení AUC

Introduction to Predictive Analytics in Python

Přetrénování

Introduction to Predictive Analytics in Python

Detekce přetrénování

Introduction to Predictive Analytics in Python

Rozdělení dat

from sklearn.model_selection import train_test_split

X = basetable.drop("target", 1) y = basetable["target"]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, stratify = Y)
train = pd.concat([X_train, y_train], axis=1) test = pd.concat([X_test, y_test], axis=1)
Introduction to Predictive Analytics in Python

Určení hranice

  • Vysoká testovací AUC
  • Nízký počet proměnných
Introduction to Predictive Analytics in Python

Určení hranice

Introduction to Predictive Analytics in Python

Pojďme si procvičit!

Introduction to Predictive Analytics in Python

Preparing Video For Download...