diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2015-07-31 11:56:52 -0700 |
---|---|---|
committer | Joseph K. Bradley <joseph@databricks.com> | 2015-07-31 11:56:52 -0700 |
commit | e8bdcdeabb2df139a656f86686cdb53c891b1f4b (patch) | |
tree | d6ccab74f50d58e7b18a786ce66dcd8f5fe30f60 /streaming | |
parent | 4011a947154d97a9ffb5a71f077481a12534d36b (diff) | |
download | spark-e8bdcdeabb2df139a656f86686cdb53c891b1f4b.tar.gz spark-e8bdcdeabb2df139a656f86686cdb53c891b1f4b.tar.bz2 spark-e8bdcdeabb2df139a656f86686cdb53c891b1f4b.zip |
[SPARK-6885] [ML] decision tree support predict class probabilities
Decision tree support predict class probabilities.
Implement the prediction probabilities function referred the old DecisionTree API and the [sklean API](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/tree.py#L593).
I make the DecisionTreeClassificationModel inherit from ProbabilisticClassificationModel, make the predictRaw to return the raw counts vector and make raw2probabilityInPlace/predictProbability return the probabilities for each prediction.
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #7694 from yanboliang/spark-6885 and squashes the following commits:
08d5b7f [Yanbo Liang] fix ImpurityStats null parameters and raw2probabilityInPlace sum = 0 issue
2174278 [Yanbo Liang] solve merge conflicts
7e90ba8 [Yanbo Liang] fix typos
33ae183 [Yanbo Liang] fix annotation
ff043d3 [Yanbo Liang] raw2probabilityInPlace should operate in-place
c32d6ce [Yanbo Liang] optimize calculateImpurityStats function again
6167fb0 [Yanbo Liang] optimize calculateImpurityStats function
fbbe2ec [Yanbo Liang] eliminate duplicated struct and code
beb1634 [Yanbo Liang] try to eliminate impurityStats for each LearningNode
99e8943 [Yanbo Liang] code optimization
5ec3323 [Yanbo Liang] implement InformationGainAndImpurityStats
227c91b [Yanbo Liang] refactor LearningNode to store ImpurityCalculator
d746ffc [Yanbo Liang] decision tree support predict class probabilities
Diffstat (limited to 'streaming')
0 files changed, 0 insertions, 0 deletions