diff --git "a/week4/ML\341\204\211\341\205\263\341\204\220\341\205\245\341\204\203\341\205\265 4\341\204\214\341\205\256\341\204\216\341\205\241 -1.ipynb" "b/week4/ML\341\204\211\341\205\263\341\204\220\341\205\245\341\204\203\341\205\265 4\341\204\214\341\205\256\341\204\216\341\205\241 -1.ipynb" new file mode 100644 index 0000000..73155e2 --- /dev/null +++ "b/week4/ML\341\204\211\341\205\263\341\204\220\341\205\245\341\204\203\341\205\265 4\341\204\214\341\205\256\341\204\216\341\205\241 -1.ipynb" @@ -0,0 +1 @@ +{"cells":[{"cell_type":"markdown","metadata":{"id":"5uA_6TRHEMHV"},"source":["# 결정 트리"]},{"cell_type":"markdown","metadata":{"id":"26KAIfzEEMHc"},"source":["
\n"," 구글 코랩에서 실행하기\n"," | \n","
\n"," | alcohol | \n","sugar | \n","pH | \n","class | \n","
---|---|---|---|---|
0 | \n","9.4 | \n","1.9 | \n","3.51 | \n","0.0 | \n","
1 | \n","9.8 | \n","2.6 | \n","3.20 | \n","0.0 | \n","
2 | \n","9.8 | \n","2.3 | \n","3.26 | \n","0.0 | \n","
3 | \n","9.8 | \n","1.9 | \n","3.16 | \n","0.0 | \n","
4 | \n","9.4 | \n","1.9 | \n","3.51 | \n","0.0 | \n","
\n"," | alcohol | \n","sugar | \n","pH | \n","class | \n","
---|---|---|---|---|
count | \n","6497.000000 | \n","6497.000000 | \n","6497.000000 | \n","6497.000000 | \n","
mean | \n","10.491801 | \n","5.443235 | \n","3.218501 | \n","0.753886 | \n","
std | \n","1.192712 | \n","4.757804 | \n","0.160787 | \n","0.430779 | \n","
min | \n","8.000000 | \n","0.600000 | \n","2.720000 | \n","0.000000 | \n","
25% | \n","9.500000 | \n","1.800000 | \n","3.110000 | \n","1.000000 | \n","
50% | \n","10.300000 | \n","3.000000 | \n","3.210000 | \n","1.000000 | \n","
75% | \n","11.300000 | \n","8.100000 | \n","3.320000 | \n","1.000000 | \n","
max | \n","14.900000 | \n","65.800000 | \n","4.010000 | \n","1.000000 | \n","
\n"," 구글 코랩에서 실행하기\n"," | \n","
GridSearchCV(estimator=DecisionTreeClassifier(random_state=42), n_jobs=-1,\n"," param_grid={'min_impurity_decrease': [0.0001, 0.0002, 0.0003,\n"," 0.0004, 0.0005]})In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
GridSearchCV(estimator=DecisionTreeClassifier(random_state=42), n_jobs=-1,\n"," param_grid={'min_impurity_decrease': [0.0001, 0.0002, 0.0003,\n"," 0.0004, 0.0005]})
DecisionTreeClassifier(min_impurity_decrease=0.0001, random_state=42)
DecisionTreeClassifier(min_impurity_decrease=0.0001, random_state=42)
GridSearchCV(estimator=DecisionTreeClassifier(random_state=42), n_jobs=-1,\n"," param_grid={'max_depth': range(5, 20),\n"," 'min_impurity_decrease': array([0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008,\n"," 0.0009]),\n"," 'min_samples_split': range(2, 100, 10)})In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
GridSearchCV(estimator=DecisionTreeClassifier(random_state=42), n_jobs=-1,\n"," param_grid={'max_depth': range(5, 20),\n"," 'min_impurity_decrease': array([0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008,\n"," 0.0009]),\n"," 'min_samples_split': range(2, 100, 10)})
DecisionTreeClassifier(max_depth=14, min_impurity_decrease=0.0004,\n"," min_samples_split=12, random_state=42)
DecisionTreeClassifier(max_depth=14, min_impurity_decrease=0.0004,\n"," min_samples_split=12, random_state=42)
RandomizedSearchCV(estimator=DecisionTreeClassifier(random_state=42),\n"," n_iter=100, n_jobs=-1,\n"," param_distributions={'max_depth': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225466d40>,\n"," 'min_impurity_decrease': <scipy.stats._distn_infrastructure.rv_continuous_frozen object at 0x7e5225464b50>,\n"," 'min_samples_leaf': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e52254661d0>,\n"," 'min_samples_split': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225467c10>},\n"," random_state=42)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
RandomizedSearchCV(estimator=DecisionTreeClassifier(random_state=42),\n"," n_iter=100, n_jobs=-1,\n"," param_distributions={'max_depth': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225466d40>,\n"," 'min_impurity_decrease': <scipy.stats._distn_infrastructure.rv_continuous_frozen object at 0x7e5225464b50>,\n"," 'min_samples_leaf': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e52254661d0>,\n"," 'min_samples_split': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225467c10>},\n"," random_state=42)
DecisionTreeClassifier(max_depth=39,\n"," min_impurity_decrease=0.00034102546602601173,\n"," min_samples_leaf=7, min_samples_split=13,\n"," random_state=42)
DecisionTreeClassifier(max_depth=39,\n"," min_impurity_decrease=0.00034102546602601173,\n"," min_samples_leaf=7, min_samples_split=13,\n"," random_state=42)
RandomizedSearchCV(estimator=DecisionTreeClassifier(random_state=42,\n"," splitter='random'),\n"," n_iter=100, n_jobs=-1,\n"," param_distributions={'max_depth': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225466d40>,\n"," 'min_impurity_decrease': <scipy.stats._distn_infrastructure.rv_continuous_frozen object at 0x7e5225464b50>,\n"," 'min_samples_leaf': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e52254661d0>,\n"," 'min_samples_split': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225467c10>},\n"," random_state=42)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
RandomizedSearchCV(estimator=DecisionTreeClassifier(random_state=42,\n"," splitter='random'),\n"," n_iter=100, n_jobs=-1,\n"," param_distributions={'max_depth': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225466d40>,\n"," 'min_impurity_decrease': <scipy.stats._distn_infrastructure.rv_continuous_frozen object at 0x7e5225464b50>,\n"," 'min_samples_leaf': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e52254661d0>,\n"," 'min_samples_split': <scipy.stats._distn_infrastructure.rv_discrete_frozen object at 0x7e5225467c10>},\n"," random_state=42)
DecisionTreeClassifier(max_depth=43,\n"," min_impurity_decrease=0.00011407982271508446,\n"," min_samples_leaf=19, min_samples_split=18,\n"," random_state=42, splitter='random')
DecisionTreeClassifier(max_depth=43,\n"," min_impurity_decrease=0.00011407982271508446,\n"," min_samples_leaf=19, min_samples_split=18,\n"," random_state=42, splitter='random')
\n"," 구글 코랩에서 실행하기\n"," | \n","