diff options
Diffstat (limited to 'examples/src/main/python/ml/random_forest_classifier_example.py')
-rw-r--r-- | examples/src/main/python/ml/random_forest_classifier_example.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/python/ml/random_forest_classifier_example.py b/examples/src/main/python/ml/random_forest_classifier_example.py index c618eaf60c..a7fc765318 100644 --- a/examples/src/main/python/ml/random_forest_classifier_example.py +++ b/examples/src/main/python/ml/random_forest_classifier_example.py @@ -66,7 +66,7 @@ if __name__ == "__main__": # Select (prediction, true label) and compute test error evaluator = MulticlassClassificationEvaluator( - labelCol="indexedLabel", predictionCol="prediction", metricName="precision") + labelCol="indexedLabel", predictionCol="prediction", metricName="accuracy") accuracy = evaluator.evaluate(predictions) print("Test Error = %g" % (1.0 - accuracy)) |