aboutsummaryrefslogtreecommitdiff
path: root/streaming/src/test
diff options
context:
space:
mode:
authorjohnnywalleye <jsondag@gmail.com>2014-07-08 19:17:26 -0700
committerXiangrui Meng <meng@databricks.com>2014-07-08 19:17:43 -0700
commitd569838bc067f2b64f6c10e54ba8e5973f8fc93a (patch)
treec6b8244617ecd5e59d7fdbc2ffc6fcb7fd2d2f2b /streaming/src/test
parent885489112c82eb909df7efbf0515fd7abfae41a4 (diff)
downloadspark-d569838bc067f2b64f6c10e54ba8e5973f8fc93a.tar.gz
spark-d569838bc067f2b64f6c10e54ba8e5973f8fc93a.tar.bz2
spark-d569838bc067f2b64f6c10e54ba8e5973f8fc93a.zip
[SPARK-2152][MLlib] fix bin offset in DecisionTree node aggregations (also resolves SPARK-2160)
Hi, this pull fixes (what I believe to be) a bug in DecisionTree.scala. In the extractLeftRightNodeAggregates function, the first set of rightNodeAgg values for Regression are set in line 792 as follows: rightNodeAgg(featureIndex)(2 * (numBins - 2)) = binData(shift + (2 * numBins - 1))) Then there is a loop that sets the rest of the values, as in line 809: rightNodeAgg(featureIndex)(2 * (numBins - 2 - splitIndex)) = binData(shift + (2 *(numBins - 2 - splitIndex))) + rightNodeAgg(featureIndex)(2 * (numBins - 1 - splitIndex)) But since splitIndex starts at 1, this ends up skipping a set of binData values. The changes here address this issue, for both the Regression and Classification cases. Author: johnnywalleye <jsondag@gmail.com> Closes #1316 from johnnywalleye/master and squashes the following commits: 73809da [johnnywalleye] fix bin offset in DecisionTree node aggregations (cherry picked from commit 1114207cc8e4ef94cb97bbd5a2ef3ae4d51f73fa) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Diffstat (limited to 'streaming/src/test')
0 files changed, 0 insertions, 0 deletions