From 72427c3e115daf06f7ad8aa50115a8e0da2c6d62 Mon Sep 17 00:00:00 2001 From: Yanbo Liang Date: Mon, 22 Feb 2016 23:37:09 -0800 Subject: [SPARK-13429][MLLIB] Unify Logistic Regression convergence tolerance of ML & MLlib ## What changes were proposed in this pull request? In order to provide better and consistent result, let's change the default value of MLlib ```LogisticRegressionWithLBFGS convergenceTol``` from ```1E-4``` to ```1E-6``` which will be equal to ML ```LogisticRegression```. cc dbtsai ## How was the this patch tested? unit tests Author: Yanbo Liang Closes #11299 from yanboliang/spark-13429. --- python/pyspark/mllib/classification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/pyspark/mllib') diff --git a/python/pyspark/mllib/classification.py b/python/pyspark/mllib/classification.py index b24592c379..b4d54ef61b 100644 --- a/python/pyspark/mllib/classification.py +++ b/python/pyspark/mllib/classification.py @@ -327,7 +327,7 @@ class LogisticRegressionWithLBFGS(object): @classmethod @since('1.2.0') def train(cls, data, iterations=100, initialWeights=None, regParam=0.01, regType="l2", - intercept=False, corrections=10, tolerance=1e-4, validateData=True, numClasses=2): + intercept=False, corrections=10, tolerance=1e-6, validateData=True, numClasses=2): """ Train a logistic regression model on the given data. @@ -359,7 +359,7 @@ class LogisticRegressionWithLBFGS(object): (default: 10) :param tolerance: The convergence tolerance of iterations for L-BFGS. - (default: 1e-4) + (default: 1e-6) :param validateData: Boolean parameter which indicates if the algorithm should validate data before training. -- cgit v1.2.3