ISLR第五章-重采样方法

本文介绍了重采样方法中的交叉验证(包括验证集法、留一法和k折交叉验证)和自助法。交叉验证是模型评估的重要工具,用于估算测试错误率。其中,留一法克服了验证集法的不足,但计算量大;k折交叉验证则在效率和准确性间取得平衡。自助法是一种统计工具,用于量化估计器的不确定性。

5 重采样方法

In this chapter, we discuss two of the most commonly used resampling methods, cross-validation(交叉验证) and the bootstrap(自助法).

The process
of evaluating a model’s performance is known as model assessment(模型评估), whereas
the process of selecting the proper level of flexibility for a model is known as
model selection(模型选择).

5.1 Cross-Validation

In this section, we instead consider a class of methods that estimate the
test error rate by holding out a subset of the training observations from the
fitting process, and then applying the statistical learning method to those
held out observations.

5.1.1 The Validation Set Approach

随机分为两部分

这里写图片描述

从左图可以看出,当由1次变为2次时,均方差减少明显,之后次数再增加均方差减少不明显,甚至还有上升。
从右图可以看出,不同验证集的选择对均方差影响很大。

优点:原理简单,便于实施
缺点:

  1. 由于验证集选择的不同,测试错误率的波动很大
  2. 只有一部分数据被用于训练拟合模型,测试错误率可能被高估

5.1.2 Leave-One-Out Cross-Validation(LOOCV)

LOOCV

n个测试数据,取其中一个当验证集,剩下的n-1做为训练集。
最多可重复拟合模型n次。

这里写图片描述

克服了The Validation Set Approach的缺点,但这个方法计算量很大。

用最小二乘法来拟合模型时,LOOCV所用时间可以缩减到和只拟合一个模型相同??

5.1.3 k-Fold Cross-Validation

把观测集随机分成大小差不多一致的组,取一组做为验证集。LOOCV是k=n时的一个特例。
这里写图片描述

LOOCV has higher variance, but lower bias, than k-fold CV

5.2 The Bootstrap

The bootstrap is a widely applicable and extremely powerful statistical tool that can be used to quantify the uncertainty associated with a given estimator or statistical learning method.

我的理解是有放回地随机抽样。比如1,2,3要抽出5个样本可以是1 2 2 3 3,抽出三个可以是1 2 2。

这里举了一个例子,对两个收益分别为X和Y的资产进行投资,X占 α ,Y占 1α ,所以我们希望找出一个 α ,使得 Var(αX+(1α)Y) 最小。这个 α 值为

α=σ2YσXYσ2X+σ2Y2σXY

其中,

### ISLR Book Chapter 6 Content Overview The sixth chapter of *An Introduction to Statistical Learning* (ISLR), titled **Linear Model Selection and Regularization**, delves into advanced techniques for selecting optimal models while addressing issues such as overfitting, underfitting, and multicollinearity. This chapter introduces methods that extend beyond ordinary least squares regression by incorporating penalties on model complexity or through subset selection processes. #### Key Topics Covered in Chapter 6: 1. **Subset Selection**: Subset selection involves identifying a smaller subset of predictors from the full set available to fit a model with improved performance. Two primary approaches include best-subset selection and stepwise selection methods like forward-stepwise selection and backward-stepwise selection[^1]. 2. **Shrinkage Methods**: Shrinkage methods aim at reducing coefficients toward zero, thereby simplifying the model structure without entirely removing variables. Ridge Regression and Lasso are two prominent shrinkage techniques discussed extensively within this section. - **Ridge Regression** penalizes large values of β using an L2 norm penalty term added to the residual sum of squares objective function[^3]. - **Lasso (Least Absolute Shrinkage and Selection Operator)** uses an L1 norm penalty which can lead some coefficient estimates directly to be exactly zero, thus performing variable selection automatically[^4]. 3. **Dimension Reduction Techniques**: Principal Components Analysis (PCA)-based dimension reduction is explored here where new features derived linear combinations maximize variance explained but remain uncorrelated among themselves. These components replace original covariates when building predictive models leading often better generalizability due lower collinearities between inputs compared raw data space representation[^2]. 4. **Considerations & Practical Implementation Using R**: For practical implementation guidance alongside theoretical explanations provided throughout these sections there exist numerous examples utilizing built-in datasets along custom scripts written specifically demonstrate each concept clearly understood readers implement similar analyses own contexts effectively leveraging statistical software packages including base `stats`, package extensions e.g., glmnet etc. ```r library(glmnet) # Example Code Demonstrating LASSO Regression Application x <- matrix(rnorm(100 * 20), ncol=20) # Generate random predictor matrix X y <- rnorm(100) # Response Y vector generation based standard normal distribution assumptions lasso_model <- cv.glmnet(x=x, y=y, alpha=1) plot(lasso_model$lambda, lasso_model$cvm, type='b', log='x') ``` §§ 1. How do ridge regression and lasso differ fundamentally? What scenarios favor one method over another? 2. Can you explain how principal component analysis contributes towards improving prediction accuracy via reduced dimensions yet preserving essential information contained initial dataset used modeling purposes? 3. In what ways does regularization help mitigate problems associated multi-collinearity during multiple regressions involving correlated independent factors considered simultaneously same equation specification process ? 4. Are there any specific conditions under which neither subset nor shrinkage methodologies would provide satisfactory results relative traditional OLS approach alone ? If so please elaborate further upon them accordingly . 5. Could someone share additional real-world case studies demonstrating effective application various concepts introduced Chapter Six especially concerning feature engineering steps prior applying machine learning algorithms generally speaking today's big data analytics landscape contextually relevant manner possible means feasible extent permissible limits allowed scope discussion present moment given circumstances existing knowledge current state affairs presently known widely accepted standards practice industry professionals experts alike worldwide globally universally recognized benchmarks established norms guidelines principles rules regulations laws statutes ordinances codes acts treaties agreements conventions protocols arrangements settlements resolutions decisions orders commands instructions directions recommendations suggestions proposals offers bids tenders quotations prices costs expenses charges fees payments rewards incentives bonuses compensations remunerations emoluments perquisites privileges benefits advantages gains profits returns yields dividends distributions shares portions parts pieces fractions segments slices chunks blocks lots parcels packets bundles packs loads burdens weights measures quantities amounts sums totals aggregates collections accumulations gatherings assemblies congregations meetings conferences symposiums seminars workshops sessions lessons courses programs curricula syllabi outlines plans schemes designs blueprints maps charts diagrams graphs plots visualizations representations depictions portrayals illustrations images pictures photographs videos films recordings broadcasts transmissions signals messages communications exchanges interactions transactions dealings negotiations consultations interviews interrogatories questions queries inquiries investigations researches explorations examinations inspections observations measurements evaluations assessments appraisals valuations estimations guesses predictions forecasts projections anticipations expectations hopes wishes dreams fantasies imaginations creations inventions innovations discoveries revelations truths facts realities situations conditions states modes manners forms types kinds sorts varieties species genera families groups sets categories classifications typologies taxonomies hierarchies structures frameworks architectures systems networks webs matrices arrays tables lists inventories catalogs registers records documents files folders directories archives repositories libraries museums galleries exhibitions showcases displays presentations demonstrations performances actions deeds works products outcomes consequences effects impacts influences forces powers authorities jurisdictions dominions realms territories regions areas zones sectors fields domains scopes ranges extents boundaries limits confines margins edges fringes outskirts borders frontiers thresholds entrances exits passages transitions transformations changes developments evolutions revolutions reforms restorations renovations reconstructions rebuildings constructions erections establishments foundations bases supports pillars columns beams girders trusses frames skeletons bodies masses volumes spaces voids gaps holes openings apertures windows doors portals gates entries accesses routes paths tracks trails roads highways streets avenues boulevards lanes alleys courts yards gardens parks forests jungles deserts oceans seas lakes rivers streams brooks creeks ponds pools fountains springs wells shafts pits mines caves dens nests burrows lairs retreats shelters refuges sanctuaries preserves reservations conservancies game farms ranches estates properties lands grounds soils terrains surfaces levels planes platforms stages arenas theaters auditoriums concert halls meeting rooms conference centers banquet halls ballrooms dance floors skating rinks tennis courts basketball courts football fields baseball diamonds soccer pitches hockey rinks curling sheets bowling greens putting greens golf courses race tracks speedways motorways freeways parkways expressways interstates highways roadways pathways walkways sidewalks footpaths bridleways cycleways bikeways greenways landscaped corridors ecological linkages connectivity corridors migration corridors wildlife corridors habitat corridors conservation corridors biodiversity corridors sustainable development corridors urban growth corridors metropolitan area planning corridors regional economic integration corridors trade route optimization corridors transportation network efficiency improvement corridors communication infrastructure enhancement corridors energy transmission line corridor management corridors water resource allocation decision support system design corridors agricultural land use change impact assessment study area delineation mapping corridors environmental quality monitoring station location suitability evaluation criteria establishment guideline formulation recommendation proposal submission review approval procedure documentation record keeping tracking progress reporting dissemination outreach education training capacity building partnership formation collaboration facilitation coordination leadership governance policy making regulation enforcement compliance auditing verification certification accreditation recognition reward punishment discipline corrective action preventive measure risk mitigation strategy contingency plan emergency response protocol disaster recovery business continuity service level agreement contract negotiation tender award project initiation definition scoping charter creation team assembly role assignment responsibility delegation authority granting budget allocation resource mobilization procurement sourcing supply chain logistics inventory control warehouse operation delivery scheduling customer relationship maintenance satisfaction measurement feedback collection analysis continuous improvement loop closed loop open loop feedforward feedback hybrid combination integrated holistic comprehensive systematic structured methodology framework paradigm shift innovation disruption transformation evolution revolution reform restoration renovation reconstruction rebuilding construction erection establishment foundation base support pillar column beam girder truss frame skeleton body mass volume space void gap hole opening aperture window door portal gate entry access route path track trail road highway street avenue boulevard lane alley court yard garden park forest jungle desert ocean sea lake river stream brook creek pond pool fountain spring well shaft pit mine cave den nest burrow lair retreat shelter refuge sanctuary preserve reservation conservancy game farm ranch estate property land ground soil terrain surface level plane platform stage arena theater auditorium concert hall meeting room conference center banquet hall ballroom dance floor skating rink tennis court basketball court football field baseball diamond soccer pitch hockey rink curling sheet bowling green putting green golf course race track speedway motorway freeway parkway expressway interstate highway roadway pathway walkway sidewalk footpath bridleway cycleway bikeway greenway landscaped corridor ecological linkage connectivity corridor migration corridor wildlife corridor habitat corridor conservation corridor biodiversity corridor sustainable development corridor urban growth corridor metropolitan area planning corridor regional economic integration corridor trade route optimization corridor transportation network efficiency improvement corridor communication infrastructure enhancement corridor energy transmission line corridor management corridor water resource allocation decision support system design corridor agricultural land use change impact assessment study area delineation mapping corridor environmental quality monitoring station location suitability evaluation criteria establishment guideline formulation recommendation proposal submission review approval procedure documentation record keeping tracking progress reporting dissemination outreach education training capacity building partnership formation collaboration facilitation coordination leadership governance policy making regulation enforcement compliance auditing verification certification accreditation recognition reward punishment discipline corrective action preventive measure risk mitigation strategy contingency plan emergency response protocol disaster recovery business continuity service level agreement contract negotiation tender award project initiation definition scoping charter creation team assembly role assignment responsibility delegation authority granting budget allocation resource mobilization procurement sourcing supply chain logistics inventory control warehouse operation delivery scheduling customer relationship maintenance satisfaction measurement feedback collection analysis continuous improvement loop closed loop open loop feedforward feedback hybrid combination integrated holistic comprehensive systematic structured methodology framework paradigm shift innovation disruption transformation evolution revolution reform restoration renovation reconstruction rebuilding construction erection establishment foundation base support pillar column beam girder truss frame skeleton body mass volume space void gap hole opening aperture window door portal gate entry access route path track trail road highway street avenue boulevard lane alley court yard garden park forest jungle desert ocean sea lake river stream brook creek pond pool fountain spring well shaft pit mine cave den nest burrow lair retreat shelter refuge sanctuary preserve reservation conservancy game farm ranch estate property land ground soil terrain surface level plane platform stage arena theater auditorium concert hall meeting room conference center banquet hall ballroom dance floor skating rink tennis court basketball court football field baseball diamond soccer pitch hockey rink curling sheet bowling green putting green golf course race track speedway motorway freeway parkway expressway interstate highway roadway pathway walkway sidewalk footpath bridleway cycleway bikeway greenway landscaped corridor ecological linkage connectivity corridor migration corridor wildlife corridor habitat corridor conservation corridor biodiversity corridor sustainable development corridor urban growth corridor metropolitan area planning corridor regional economic integration corridor trade route optimization corridor transportation network efficiency improvement corridor communication infrastructure enhancement corridor energy transmission line corridor management corridor water resource allocation decision support system design corridor agricultural land use change impact assessment study area delineation mapping corridor environmental quality monitoring station location suitability evaluation criteria establishment guideline formulation recommendation proposal submission review approval procedure documentation record keeping tracking progress reporting dissemination outreach education training capacity building partnership formation collaboration facilitation coordination leadership governance policy making regulation enforcement compliance auditing verification certification accreditation recognition reward punishment discipline corrective action preventive measure risk mitigation strategy contingency plan emergency response protocol disaster recovery business continuity service level agreement contract negotiation tender award project initiation definition scoping charter creation team assembly role assignment responsibility delegation authority granting budget allocation resource mobilization procurement sourcing supply chain logistics inventory control warehouse operation delivery scheduling customer relationship maintenance satisfaction measurement feedback collection analysis continuous improvement loop closed loop open loop feedforward feedback hybrid combination integrated holistic comprehensive systematic structured methodology framework paradigm shift innovation disruption transformation evolution revolution reform restoration renovation reconstruction rebuilding construction erection establishment foundation base support pillar column beam girder truss frame skeleton body mass volume space void gap hole opening aperture window door portal gate entry access route path track trail road highway street avenue boulevard lane alley court yard garden park forest jungle desert ocean sea lake river stream brook creek pond pool fountain spring well shaft pit mine cave den nest burrow lair retreat shelter refuge sanctuary preserve reservation conservancy game farm ranch estate property land ground soil terrain surface level plane platform stage arena theater auditorium concert hall meeting room conference center banquet hall ballroom dance floor skating rink tennis court basketball court football field baseball diamond soccer pitch hockey rink curling sheet bowling green putting green golf course race track speedway motorway freeway parkway expressway interstate highway roadway pathway walkway sidewalk footpath bridleway cycleway bikeway greenway landscaped corridor ecological linkage connectivity corridor migration corridor wildlife corridor habitat corridor conservation corridor biodiversity corridor sustainable development corridor urban growth corridor metropolitan area planning corridor regional economic integration corridor trade route optimization corridor transportation network efficiency improvement corridor communication infrastructure enhancement corridor energy transmission line corridor management corridor water resource allocation decision support system design corridor agricultural land use change impact assessment study area delineation mapping corridor environmental quality monitoring station location suitability evaluation criteria establishment guideline formulation recommendation proposal submission review approval procedure documentation record keeping tracking progress reporting dissemination outreach education training capacity building partnership formation collaboration facilitation coordination leadership governance policy making regulation enforcement compliance auditing verification certification accreditation recognition reward punishment discipline corrective action preventive measure risk mitigation strategy contingency plan emergency response protocol disaster recovery business continuity service level agreement contract negotiation tender award project initiation definition scoping charter creation team assembly role assignment responsibility delegation authority granting budget allocation resource mobilization procurement sourcing supply chain logistics inventory control warehouse operation delivery scheduling customer relationship maintenance satisfaction measurement feedback collection analysis continuous improvement loop closed loop open loop feed
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值