mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-05-01 22:18:10 +08:00
Merge pull request #140 from rschmukler/id3_fix
fix(id3): fix panic on SplitAttribute being nil
This commit is contained in:
commit
7df81bb286
@ -113,7 +113,7 @@ func InferID3Tree(from base.FixedDataGrid, with RuleGenerator) *DecisionTreeNode
|
||||
|
||||
// Generate the splitting rule
|
||||
splitRule := with.GenerateSplitRule(from)
|
||||
if splitRule == nil {
|
||||
if splitRule == nil || splitRule.SplitAttr == nil {
|
||||
// Can't determine, just return what we have
|
||||
return ret
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user