SAS Module 5 Decision Tree

本文深入探讨了CART决策树的原理与应用,包括分类树和回归树的构建过程,如何通过最小化RSS和Gini指数进行特征选择,以及如何避免过拟合问题。文章还讨论了决策树的优势和局限性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SAS

Module 5 Decision Tree

CART: Classification And Regression Tree

  • For classification trees, final prediction is the mode of the training observations in the region
  • For regression trees, final prediction is the mean of the training observations in the region

Regression Tree:

  • We divide the predictor space into J distinct and non-overlapping regions R1,R2,R3…Rj
  • For each region, we find the mean of the response values for the training observations
  • Calculate total RSS for each region, and find the smallest one (we can do this on Excel)
    在这里插入图片描述
  • This equation is to find good cut-point “s” of predictor “Xj” to split, so it will create {Xj|Xj>=s} and {Xj|Xj<s} with smallest RSS
  • We take a top-down, greedy approach that is know as binary splitting, so repeat the above process again and again

When to stop? : Prune Tree

  • If not prune tree, it is likely to overfit the data, leading to poor test set performance
  • Smaller tree might lead to lower variance and better interpretation
  • The strategy is to grow a very large tree first, and then prune it to a subtree
  • Prune the tree to the number of nodes with smallest MSE (mean square error)

Classification Tree:

  • Similar as regression tree, except that it is used to predict qualitative response
  • Goal is to find most commonly occurring class (mode)
  • Still use binary splitting, not depends on RSS, but on Gini Index
  • m represents different region, and i represents different class(Yes/No,1/0,T/F). Finally, use weight of each region to calculate the final Gini index在这里插入图片描述

Advantage and of Trees:

  • Easy to interpret
  • More closely mirror human decision-making process
  • Can be displayed graphically
  • Trees are good for both qualitative and quantitive response, not need to create extra dummy variables for qualitative response

Disadvantage of Trees:

  • Do not have same level of predictive accuracy as other approaches (but can use Bagging, Forest and Boosting to improve)
  • High variance: different partitions of the same data set may product quite different trees
  • Instability: Very minor changes can result in significantly different trees
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值