Skip to content
Closed
Prev Previous commit
Next Next commit
CLN: use if-indent style
  • Loading branch information
facaiy committed Jul 7, 2017
commit 1c215f3c682a8e13db7dd71803f36985fc20b8da
6 changes: 3 additions & 3 deletions python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,9 +1546,9 @@ def _fit(self, dataset):

numClasses = int(dataset.agg({labelCol: "max"}).head()["max("+labelCol+")"]) + 1

if (isinstance(classifier, HasWeightCol) and
classifier.isDefined(classifier.weightCol) and
classifier.getWeightCol()):
if (isinstance(classifier, HasWeightCol)
and classifier.isDefined(classifier.weightCol)
and classifier.getWeightCol()):
multiclassLabeled = dataset.select(labelCol, featuresCol, classifier.getWeightCol())
else:
multiclassLabeled = dataset.select(labelCol, featuresCol)
Expand Down