mirror of
https://github.com/ltcptgeneral/IdealRMT-DecisionTrees.git
synced 2025-09-06 07:17:23 +00:00
cleanup code
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 32,
|
"execution_count": null,
|
||||||
"id": "d336971a",
|
"id": "d336971a",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -61,8 +61,7 @@
|
|||||||
" threshold = tree.tree_.threshold\n",
|
" threshold = tree.tree_.threshold\n",
|
||||||
" features = [feature_names[i] for i in tree.tree_.feature]\n",
|
" features = [feature_names[i] for i in tree.tree_.feature]\n",
|
||||||
" value = tree.tree_.value\n",
|
" value = tree.tree_.value\n",
|
||||||
" le = '<='\n",
|
"\n",
|
||||||
" g = '>'\n",
|
|
||||||
" # get ids of child nodes\n",
|
" # get ids of child nodes\n",
|
||||||
" idx = np.argwhere(left == -1)[:, 0]\n",
|
" idx = np.argwhere(left == -1)[:, 0]\n",
|
||||||
" \n",
|
" \n",
|
||||||
@@ -105,7 +104,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 33,
|
"execution_count": null,
|
||||||
"id": "b96f3403",
|
"id": "b96f3403",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
Reference in New Issue
Block a user