Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/4231#discussion_r24785149
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
@@ -1064,9 +1045,12 @@ object DecisionTree extends Serializable with
Logging {
// Bins correspond to feature values, so we do not need to
compute splits or bins
// beforehand. Splits are constructed as needed during
training.
splits(featureIndex) = new Array[Split](0)
- bins(featureIndex) = new Array[Bin](0)
}
- }
+ // For ordered features, bins correspond to feature values.
+ // For unordered categorical features, there is no need to
construct the bins.
+ // since there is a one-to-one correspondence between the
splits and the bins.
+ bins(featureIndex) = new Array[Bin](0)
+ }
--- End diff --
fix indentation
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]