Cart(Classification And Regression Tree)决策树作为决策树算法分支的一条,是一类可用于分类与回归的非线性模型。其在python中的接口为from sklearn.tree import DecisionTreeClassifier
首先查看DecisionTreeClassifier都有哪些参数
DecisionTreeClassifier?
Init signature:
DecisionTreeClassifier(criterion='gini',
splitter='best',
max_depth=None,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features=None,
random_state=None,
max_leaf_nodes=None