THIS IS A COMPLETE NOTE FROM ALL BOOKS + LECTURE!
Save your time for internships, other courses by studying over this note!
Are you a 1st/2nd year of Business Analytics Management student at RSM, who want to survive the block 2 Machine Learning module? Are you overwhelmed with 30 pages of re...
ISLR 8: Tree-Based Methods
Tree-based methods for regression and classification involve stratifying/segmenting the
predictor space into a number of simple regions.
For prediction, we use mean/mode response value for the training observations in the region
to which they belong.
Decision tree: the set of splitting rules to segment the predictor summarized in a tree
8.1: The basics of decision trees
8.1.1 Regression trees
In the tree analogy, decision trees are typically drawn upside down.
Splitting rule: starting at the top of the tree.
For every observation fall into each region, we make the same prediction: mean of the response
values for the training observation in each region
Decision tree: Superfical similarities with KNN
- K-NN is expensive because each prediction requires a comparison to entire training set.
- What is we partitioned the training set ahead of time, summarized the partitions with
simple rules, and pre-calculated predictions?
Purpose
Partition feature space into regions where values of target variables are relatively
homogeneous(or pure if classification tree case)
Decision tree terminologies
Terminal nodes/leaves = Regions: where all observations end up.
Internal nodes = Points along the tree where the predictor space is split
- The first internal node with the most important factor to determine the response factor
, Value at the top in the square = predicted y value
Advantage:
- Interpretability
- Similarity to human decisions
- No dummy variable required
- Good “Base learners”
- It can be visually and intuitively displayed
- Easy to handle qualitative predictors without creating dummy variables
- Can deal with the non-linear relationship by digging into specific features multiple times
in splitting
Disadvantage
- Not competitive in terms of accuracy (aggregation of trees can improve it)
- Trees can be very non-robust: small change in the data can cause a large change in the
final estimated tree
Process: Greedy approach
It is computationally infeasible to consider every possible partition of the feature space into J
boxes.
In creation of the decision tree, we take top-down greedy approach/recursive binary
splitting (for decision tree case)
o It begins at the top of the tree and then successively splits the predictor space
with two new branches
o It is greedy as the best split is made at the each of the split rather than looking
ahead and picking one that lead to a better tree in some future step.
Example: predicting salary of baseball players
1. Years <4.5?
2. For players with years <4.5, find the mean response value for those players (e.g. mean
log salary of 5.107 = $165,174)
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur ArisMaya. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €10,99. Vous n'êtes lié à rien après votre achat.