We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e511b90 commit 1c215f3Copy full SHA for 1c215f3
python/pyspark/ml/classification.py
@@ -1546,9 +1546,9 @@ def _fit(self, dataset):
1546
1547
numClasses = int(dataset.agg({labelCol: "max"}).head()["max("+labelCol+")"]) + 1
1548
1549
- if (isinstance(classifier, HasWeightCol) and
1550
- classifier.isDefined(classifier.weightCol) and
1551
- classifier.getWeightCol()):
+ if (isinstance(classifier, HasWeightCol)
+ and classifier.isDefined(classifier.weightCol)
+ and classifier.getWeightCol()):
1552
multiclassLabeled = dataset.select(labelCol, featuresCol, classifier.getWeightCol())
1553
else:
1554
multiclassLabeled = dataset.select(labelCol, featuresCol)
0 commit comments