mirror of
https://github.com/ltcptgeneral/IdealRMT-DecisionTrees.git
synced 2025-09-04 14:27:23 +00:00
fix range bug in TreeCompress, update parser to autofail non-singular classifications
This commit is contained in:
@@ -109,13 +109,13 @@
|
||||
"\t\tvalue = condition[\"value\"]\n",
|
||||
"\n",
|
||||
"\t\t# move the min/max for the corresponding feature in compressed\n",
|
||||
"\t\tif operation == \"<=\" and compressed[feature][\"min\"] is None:\n",
|
||||
"\t\tif operation == \"<=\" and compressed[feature][\"max\"] is None:\n",
|
||||
"\t\t\tcompressed[feature][\"max\"] = value\n",
|
||||
"\t\telif operation == \">\" and compressed[feature][\"max\"] is None:\n",
|
||||
"\t\telif operation == \">\" and compressed[feature][\"min\"] is None:\n",
|
||||
"\t\t\tcompressed[feature][\"min\"] = value\n",
|
||||
"\t\telif operation == \"<=\" and value < compressed[feature][\"min\"]:\n",
|
||||
"\t\telif operation == \"<=\" and value < compressed[feature][\"max\"]:\n",
|
||||
"\t\t\tcompressed[feature][\"max\"] = value\n",
|
||||
"\t\telif operation == \">\" and value > compressed[feature][\"max\"]:\n",
|
||||
"\t\telif operation == \">\" and value > compressed[feature][\"min\"]:\n",
|
||||
"\t\t\tcompressed[feature][\"min\"] = value\n",
|
||||
"\n",
|
||||
"\tpath[\"compressed\"] = compressed"
|
||||
|
Reference in New Issue
Block a user