vsha96 / mllib

Machine Learning in Haskell
BSD 3-Clause "New" or "Revised" License
29 stars 1 forks source link

[BUG] [Decision Tree] Fix classification when predicting a vector at the decision (separation) border #14

Open s1m0000n opened 2 years ago

s1m0000n commented 2 years ago

Fix classification when predicting a vector at the decision (separation) border for Decision Tree at .../MLlib/Tree/Decision.hs

s1m0000n commented 2 years ago

Additional context Test cases on this should probably be added #5

vsha96 commented 2 years ago

Explanation: In the current version in the each node of a tree there is a condition value that indicates the border of the split (e.g. if there is 5, therefore condition for a feature X of processed vector is X < 5) It is used for prediction here

Problem: What if the fitted model receives a vector with the feature X = 5? Then should we choose the further path through the tree randomly or somehow rely on the number of samples?

Solution: Investigate this and make suggestions