Additive Models, Trees, etc..ppt
《Additive Models, Trees, etc..ppt》由会员分享,可在线阅读,更多相关《Additive Models, Trees, etc..ppt(32页珍藏版)》请在麦多课文档分享上搜索。
1、Additive Models, Trees, etc.,Based in part on Chapter 9 of Hastie, Tibshirani, and Friedman David Madigan,Predictive Modeling,Goal: learn a mapping: y = f(x;) Need: 1. A model structure2. A score function3. An optimization strategyCategorical y c1,cm: classification Real-valued y: regression Note: u
2、sually assume c1,cm are mutually exclusive and exhaustive,Generalized Additive Models,Highly flexible form of predictive modeling for regression and classification:,g (“link function”) could be the identity or logit or log or whatever The f s are smooth functions often fit using natural cubic spline
3、s,Basic Backfitting Algorithm,arbitrary smoother - could be natural cubic splines,Example using Rs gam function,library(mgcv) set.seed(0) n-400 x0 - runif(n, 0, 1) x1 - runif(n, 0, 1) x2 - runif(n, 0, 1) x3 - runif(n, 0, 1) pi - asin(1) * 2 f - 2 * sin(pi * x0) f - f + exp(2 * x1) - 3.75887 f - f +
4、0.2 * x211 * (10 * (1 - x2)6 +10 * (10 * x2)3 * (1 - x2)10 - 1.396 e - rnorm(n, 0, 2) y - f + e b-gam(ys(x0)+s(x1)+s(x2)+s(x3) summary(b) plot(b,pages=1),http:/www.math.mcgill.ca/sysdocs/R/library/mgcv/html/gam.html,Tree Models,Easy to understand: recursively divide predictor space into regions wher
5、e response variable has small variance Predicted value is majority class (classification) or average value (regression) Can handle mixed data, missing values, etc. Usually grow a large tree and prune it back rather than attempt to optimally stop the growing process,Training Dataset,This follows an e
6、xample from Quinlans ID3,Output: A Decision Tree for “buys_computer”,age?,overcast,student?,credit rating?,no,yes,fair,excellent,=30,40,no,no,yes,yes,yes,3040,Confusion matrix,Algorithms for Decision Tree Induction,Basic algorithm (a greedy algorithm) Tree is constructed in a top-down recursive divi
7、de-and-conquer manner At start, all the training examples are at the root Attributes are categorical (if continuous-valued, they are discretized in advance) Examples are partitioned recursively based on selected attributes Test attributes are selected on the basis of a heuristic or statistical measu
8、re (e.g., information gain) Conditions for stopping partitioning All samples for a given node belong to the same class There are no remaining attributes for further partitioning majority voting is employed for classifying the leaf There are no samples left,Information Gain (ID3/C4.5),Select the attr
9、ibute with the highest information gain Assume there are two classes, P and N Let the set of examples S contain p elements of class P and n elements of class N The amount of information, needed to decide if an arbitrary example in S belongs to P or N is defined as,e.g. I(0.5,0.5)=1; I(0.9,0.1)=0.47;
10、 I(0.99,0.01)=0.08;,Information Gain in Decision Tree Induction,Assume that using attribute A a set S will be partitioned into sets S1, S2 , , Sv If Si contains pi examples of P and ni examples of N, the entropy, or the expected information needed to classify objects in all subtrees Si isThe encodin
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ADDITIVEMODELS TREES ETCPPT
