Skip to content

Commit 9a8ce22

Browse files
committed
Fix linter issues
1 parent 8b8a6d2 commit 9a8ce22

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

python/pyspark/ml/tuning.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
__all__ = ['ParamGridBuilder']
1919

20+
2021
class ParamGridBuilder(object):
2122
"""
2223
Builder for a param grid used in grid search-based model selection.
@@ -66,18 +67,17 @@ def build(self):
6667
lr = LogisticRegression()
6768
grid_test.addGrid(lr.regParam, [1.0, 2.0, 3.0])
6869
grid_test.addGrid(lr.maxIter, [1, 5])
69-
grid_test.addGrid(lr.featuresCol, ['f'])
70+
grid_test.addGrid(lr.inputCol, ['f'])
7071
grid_test.baseOn({lr.labelCol: 'l'})
71-
grid_test.baseOn([lr.predictionCol, 'p'])
72+
grid_test.baseOn([lr.outputCol, 'p'])
7273
grid = grid_test.build()
7374
expected = [
74-
{lr.regParam: 1.0, lr.featuresCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.predictionCol: 'p'},
75-
{lr.regParam: 2.0, lr.featuresCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.predictionCol: 'p'},
76-
{lr.regParam: 3.0, lr.featuresCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.predictionCol: 'p'},
77-
{lr.regParam: 1.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'},
78-
{lr.regParam: 2.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'},
79-
{lr.regParam: 3.0, lr.featuresCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.predictionCol: 'p'}
80-
]
75+
{lr.regParam: 1.0, lr.inputCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.outputCol: 'p'},
76+
{lr.regParam: 2.0, lr.inputCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.outputCol: 'p'},
77+
{lr.regParam: 3.0, lr.inputCol: 'f', lr.maxIter: 1, lr.labelCol: 'l', lr.outputCol: 'p'},
78+
{lr.regParam: 1.0, lr.inputCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.outputCol: 'p'},
79+
{lr.regParam: 2.0, lr.inputCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.outputCol: 'p'},
80+
{lr.regParam: 3.0, lr.inputCol: 'f', lr.maxIter: 5, lr.labelCol: 'l', lr.outputCol: 'p'}]
8181

8282
for a, b in zip(grid, expected):
8383
if a != b:

0 commit comments

Comments
 (0)