aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/tests.py
diff options
context:
space:
mode:
authorHolden Karau <holden@pigscanfly.ca>2015-06-22 22:40:19 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-06-22 22:40:19 -0700
commit164fe2aa44993da6c77af6de5efdae47a8b3958c (patch)
tree938944e023b53542ee306edcecec99a24d66429f /python/pyspark/mllib/tests.py
parent44fa7df64daa55bd6eb1f2c219a9701b34e1c2a3 (diff)
downloadspark-164fe2aa44993da6c77af6de5efdae47a8b3958c.tar.gz
spark-164fe2aa44993da6c77af6de5efdae47a8b3958c.tar.bz2
spark-164fe2aa44993da6c77af6de5efdae47a8b3958c.zip
[SPARK-7781] [MLLIB] gradient boosted trees.train regressor missing max bins
Author: Holden Karau <holden@pigscanfly.ca> Closes #6331 from holdenk/SPARK-7781-GradientBoostedTrees.trainRegressor-missing-max-bins and squashes the following commits: 2894695 [Holden Karau] remove extra blank line 2573e8d [Holden Karau] Update the scala side of the pythonmllibapi and make the test a bit nicer too 3a09170 [Holden Karau] add maxBins to to the train method as well af7f274 [Holden Karau] Add maxBins to GradientBoostedTrees.trainRegressor and correctly mention the default of 32 in other places where it mentioned 100
Diffstat (limited to 'python/pyspark/mllib/tests.py')
-rw-r--r--python/pyspark/mllib/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/pyspark/mllib/tests.py b/python/pyspark/mllib/tests.py
index b13159e29d..c8d61b9855 100644
--- a/python/pyspark/mllib/tests.py
+++ b/python/pyspark/mllib/tests.py
@@ -463,6 +463,13 @@ class ListTests(MLlibTestCase):
except ValueError:
self.fail()
+ # Verify that maxBins is being passed through
+ GradientBoostedTrees.trainRegressor(
+ rdd, categoricalFeaturesInfo=categoricalFeaturesInfo, numIterations=4, maxBins=32)
+ with self.assertRaises(Exception) as cm:
+ GradientBoostedTrees.trainRegressor(
+ rdd, categoricalFeaturesInfo=categoricalFeaturesInfo, numIterations=4, maxBins=1)
+
class StatTests(MLlibTestCase):
# SPARK-4023