In [2]:
# %load /Users/facaiyan/Study/book_notes/preconfig.py
%matplotlib inline

import matplotlib.pyplot as plt
import seaborn as sns
sns.set(color_codes=True)
sns.set(font='SimHei')
plt.rcParams['axes.grid'] = False

#import numpy as np

#import pandas as pd
#pd.options.display.max_rows = 20

#import sklearn

#from IPython.display import SVG

def show_image(filename, figsize=None, res_dir=True):
    if figsize:
        plt.figure(figsize=figsize)

    if res_dir:
        filename = './res/{}'.format(filename)

    plt.imshow(plt.imread(filename))

树模型:GBDT、TreeBoost和Xgboost

  • GBDT
    • 残差,多个模型迭加
    • 正规定义
    • Gradient Boost: 损失函数是轨迹,gradient是步长寻优
    • GBDT:
  • TreeBoost
    • 对树建模,学习率进入叶子
  • Xgboost
    • 损失函数和正则,进入树
    • 参数细节:
      1. AUC: 正负样本比例