Skip to content

Commit 528d6e3

Browse files
committed
feat: Change decision tree implementation from greedy decision tree to TAO.
1 parent f1dccaf commit 528d6e3

File tree

2 files changed

+521
-162
lines changed

2 files changed

+521
-162
lines changed

app/Synthesis.hs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ main = do
4343
(D.nRows train)
4444
combined
4545
|> D.filterJust (F.name survived)
46-
|> D.randomSplit (mkStdGen 4232) 0.8
46+
|> D.randomSplit (mkStdGen 4232) 0.7
4747
-- Split the test out again.
4848
test' =
4949
D.drop
@@ -54,14 +54,18 @@ main = do
5454
fitDecisionTree
5555
( defaultTreeConfig
5656
{ maxTreeDepth = 5
57-
, minSamplesSplit = 25
58-
, minLeafSize = 15
57+
, minSamplesSplit = 10
58+
, minLeafSize = 3
59+
, taoIterations = 100
5960
, synthConfig =
6061
defaultSynthConfig
61-
{ complexityPenalty = 0
62+
{ complexityPenalty = 0.00
6263
, maxExprDepth = 2
6364
, disallowedCombinations =
64-
[(F.name age, F.name fare)]
65+
[ (F.name age, F.name fare)
66+
, ("passenger_class", "number_of_siblings_and_spouses")
67+
, ("passenger_class", "number_of_parents_and_children")
68+
]
6569
}
6670
}
6771
)

0 commit comments

Comments
 (0)