变量选择

Python 预测分析入门

Nele Verbiest, Ph.D

Data Scientist @PythonPredictions

候选预测变量

  • age
  • max_gift
  • income_low
  • min_gift, mean_gift, median_gift
  • country_USA, country_India, country_UK
  • number_gift_min50, number_gift_min100, number_gift_min150
Python 预测分析入门

变量选择:动机

含多变量模型的缺点:

  • 过拟合
  • 难以维护或部署
  • 难以解释,且多重共线性
Python 预测分析入门

模型评估:AUC

import numpy as np
from sklearn.metrics import roc_auc_score
roc_auc_score(true_target, prob_target)
Python 预测分析入门

让我们来练习!

Python 预测分析入门

Preparing Video For Download...