Github user manishamde commented on a diff in the pull request:
https://github.com/apache/spark/pull/886#discussion_r13982597
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala ---
@@ -233,13 +234,73 @@ object DecisionTree extends Serializable with Logging
{
algo: Algo,
impurity: Impurity,
maxDepth: Int): DecisionTreeModel = {
- val strategy = new Strategy(algo,impurity,maxDepth)
- new DecisionTree(strategy).train(input: RDD[LabeledPoint])
+ val strategy = new Strategy(algo, impurity, maxDepth)
+ // Converting from standard instance format to weighted input format
for tree training
+ val weightedInput = input.map(x => WeightedLabeledPoint(x.label,
x.features))
+ new DecisionTree(strategy).train(weightedInput:
RDD[WeightedLabeledPoint])
--- End diff --
Thanks. Will remove.
---
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.
---