목록의사결정 (1)
without haste but without rest
12. Decision Tree
0. 개요 (1). impurity (불순도) - entropy - gini (2). pruning (가지치기) 1. data load ## 의사결정나무 ## iris data from sklearn.datasets import load_iris from sklearn.tree import DecisionTreeClassifier iris = load_iris() y = iris.target X = iris.data[:, 2:] feature_names = iris.feature_names[2:] 2. partitioning #파티션 기준 엔트로피, 브랜치 길이 1 tree = DecisionTreeClassifier(criterion = 'entropy', max_depth = 1, random_sta..
Homework/DataMining
2020. 6. 9. 12:35