Skip to content

Commit 2b94170

Browse files
committed
fix pytest
1 parent 90c8ef2 commit 2b94170

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/ml/evaluation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ class MulticlassClassificationEvaluator(JavaEvaluator, HasLabelCol, HasPredictio
345345
0.66...
346346
>>> evaluator.evaluate(dataset, {evaluator.metricName: "accuracy"})
347347
0.66...
348-
>>> predictionAndLabelsWithProbabilities = sc.parallelize([
348+
>>> predictionAndLabelsWithProbabilities = [
349349
... (1.0, 1.0, 1.0, [0.1, 0.8, 0.1]), (0.0, 2.0, 1.0, [0.9, 0.05, 0.05]),
350-
... (0.0, 0.0, 1.0, [0.8, 0.2, 0.0]), (1.0, 1.0, 1.0, [0.3, 0.65, 0.05])])
350+
... (0.0, 0.0, 1.0, [0.8, 0.2, 0.0]), (1.0, 1.0, 1.0, [0.3, 0.65, 0.05])]
351351
>>> dataset = spark.createDataFrame(predictionAndLabelsWithProbabilities, ["prediction",
352352
... "label", "weight", "probability"])
353353
>>> evaluator = MulticlassClassificationEvaluator(predictionCol="prediction",

0 commit comments

Comments
 (0)