Bagging and other ensemble methods



  • Bagging and other ensemble methods

    Bagging is a tech for reducing generalization error by combining several models.

    Ensemble

    Suppose we have k models, every model has error ϵi\epsilon_{i}. Variance E[ϵi2]=v\mathbb E[\epsilon_{i}^{2}] = v and covariance E[ϵiϵj]=c\mathbb E[\epsilon_{i}\epsilon_{j}] = c .The result of ensemble is:
    E[(1kiϵi)2]=1k2E[i(ϵi2+jϵiϵj)]=1kv+k1kc\mathbb E[(\frac{1}{k}\sum_{i}\epsilon_{i})^{2}] = \frac{1}{k^{2}} \mathbb E[\sum_{i}(\epsilon_{i}^{2} + \sum_{j} \epsilon_{i}\epsilon_{j})]=\frac{1}{k}v + \frac{k-1}{k}c

    So, when c=vc=v ,clearly, ensemble doesn't help at all.However, when c=0c=0, bagging result is 1kv\frac{1}{k}v. It's much smaller than vv . On average, ensemble will perform at least as well as any of its members. And if the members make independent errors, the ensemble will perform significantly better than its members.

    bagging

    Bagging is a method that allows the same kind of model, training algorithm and objective function to be reused several times.

    First, construct kk different datasets. Each dataset has the same examples as the origin dataset. And every dataset is constructed by sampling with replacement from the origin dataset. Then model ii is trained on the dataset ii.

    Some tips to train nn models

    mainly make partially independent errors.

    • random initialization
    • random selection of mini batches
    • differences in hyperparameters
    • different outcomes of non-deterministic implementations of nn

 

Copyright © 2018 bbs.dian.org.cn All rights reserved.

与 Dian 的连接断开,我们正在尝试重连,请耐心等待