SAS Module 6 Advanced Techniques

SAS

Module 6 Bagging, Forest, Boosting

Types of Error in Predictive Models:

  • Bias: Generally caused by under-fit models. The model is too simple to fit the complex real-life system. The more complex the model, the less bias it generally has.
  • Variances: Generally caused by over-fit models. Variability of the prediction that can be observed by taking different training data sets and using the same model
  • We always need to make tradeoffs between bias and variances在这里插入图片描述
    Therefore, we need ensemble models (combination of the predictions from the component models) to enhance the prediction accuracy such as Bagging, Forest and Boosting

Bagging:
For regression model:

  • Take repeated samples with replacement from the training set. Generate B different bootstrapped training data sets and generate B different decision trees
  • Calculate the mean of responses as final response
  • use mtry = p (number of predictors) 有多少个不同的predictor,就随机选择几个(可重复)放进training set
    在这里插入图片描述
    For classification model:
  • Record the class that each tree assigns to each observation and vote
  • If the model provides probability estimates (logistic regression), we can also average the probabilities and choose the highest one

Random Forest:

  • Same principle as bagging, but more accurate
  • Bagging uses all predictors as split candidates, so some strong predictors may always be chosen so that the results are similar. Forest extend the bagging technique to limit 在这里插入图片描述
    to produce more variation among the trees in the ensemble. Random forests “de-correlates” the bagging trees leading to more reduction in variance
  • Forests tend to give better prediction than any specific tree, and often outperform other classes of models
  • Forests are hard to interpret, but they can be considered an “ideal” model for other models to be compared against

Gradient Boosting :Use errors to improve the model
Boosting Steps:

  1. Predict the response with a simple tree y0hat
  2. Find the error of this prediction e0
  3. Predict the error made by the previous tree e0hat
  4. Use the e0hat * shrinkage parameter + y0hat to have an improved predicted response y1hat
  5. Now, we got new error e1 from actual response y - y1hat
  6. Repeat these 5 steps for 100 times
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值