As I told you earlier, too, big decision trees with a lot of nodes and a lot of clicks have two problems.
They're difficult to interpret, and they overpowered the training data, thus giving bad asset performance.
Therefore, we decided to control the tree root in the last two religions.
We discussed some methods that stopped tree from growing when a particular condition is made.
These strategies do succeed in giving us smaller and more interpretable trees.
But they have a limitation.
These studies are short sighted.
Suppose we say that we will not make us played.
If it is giving me few units of reduction in MSE.
For simplicity, let's see.
Ten units of benefit.
So if I get 10 units of benefit from the split, I will keep that split.
Otherwise, I will not keep that split.
Now, in this situation, we're at this Naude.
If I make us played, I'm getting a benefit of two units and after this split in this node, if I make
a split, I'm getting a benefit of twelve minutes.
So in this situation.
Because the condition is not met at this node.
Regrowth will be stored started this, not only this node will not be split further.
But if you would have made the split, the next split would have given us the benefit of when we unit.
Two in such a situation will be predesigned the constraint.
We will never find out that this plague was possible because tree growth was stopped at this.
Not only.
Therefore, we need a solution where we do not miss out on such splits.
This solution is called tree pruning.
In this strategy, we draw a very large tree and then prune it, or you can say we cut some parts of
it which are not beneficial in order to obtain a optimal subtree.
So now you order subtree, which is lowest test at a rate.
We can use cross-validation to find out the test at rate of all such Sudbury's.
But this can be computationally expensive.
That is, it may take a very long time to run on this software.
Therefore, we use a method called cost, complexity, pruning or weakest link pruning.
In this matter, we add additional cost of number of terminal nodes in the tree to the Odyssey's.
So instead of minimizing Odyssey's, we minimize odysseys, plus are down for number of terminal node.
Head Alpha is called unique.
But I made it out of complexity better I would it.
If all five zero.
That is normal tree growth.
We are minimizing the normal order system so we get normal re-route.
But the value of a fire increases.
There is increasing penalty for having more split.
Therefore, value of Alpha controls three Grote.
So the process is this we have to find out the value of Alpha at which we get minimum gross validated
error on our training, said.
Using that, many of alpha will prune out tree, and we expect that this prune tree will perform better
on the test set.
So let us see how to do pwning enough software.
Next we do.