Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/5137#discussion_r27162336
--- Diff: python/pyspark/mllib/classification.py ---
@@ -237,12 +290,19 @@ def train(cls, data, iterations=100,
initialWeights=None, regParam=0.01, regType
def train(rdd, i):
return callMLlibFunc("trainLogisticRegressionModelWithLBFGS",
rdd, int(iterations), i,
float(regParam), regType,
bool(intercept), int(corrections),
- float(tolerance))
-
+ float(tolerance), bool(validateData),
int(numClasses))
+
+ if initialWeights is None:
+ if numClasses == 2:
+ initialWeights = [0.0] * len(data.first().features)
+ elif intercept:
--- End diff --
Would you mind putting the "if intercept" in an "else" clause to make it
clearer which part of this is for multiclass?
```
if numClasses == 2:
else:
if intercept:
else:
```
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]