Skip to content

Commit e253be5

Browse files
authored
fixed CrossValidator.avgMetric calculation
1 parent 03d46aa commit e253be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/ml/tuning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _fit(self, dataset):
234234
model = est.fit(train, epm[j])
235235
# TODO: duplicate evaluator to take extra params from input
236236
metric = eva.evaluate(model.transform(validation, epm[j]))
237-
metrics[j] += metric
237+
metrics[j] += metric/nFolds
238238

239239
if eva.isLargerBetter():
240240
bestIndex = np.argmax(metrics)

0 commit comments

Comments
 (0)