Pruning Decision Trees

后端 未结 4 1061
梦毁少年i
梦毁少年i 2020-12-13 07:14

Below is a snippet of the decision tree as it is pretty huge.

How to make the tree stop growing when the lowest value in a node is under 5. H

4条回答
  •  死守一世寂寞
    2020-12-13 07:47

    In Scikit learn library, you have parameter called ccp_alpha as parameter for DescissionTreeClassifier. Using this you can do post-compexity-pruning for DecessionTrees. Check this out https://scikit-learn.org/stable/auto_examples/tree/plot_cost_complexity_pruning.html

提交回复
热议问题