Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from import MulticlassClassificationEvaluator
# Select (prediction, true label) and compute test error
evaluator = MulticlassClassificationEvaluator(
labelCol="indexedRetweetLabel", predictionCol="prediction", metricName="accuracy")
accuracy = evaluator.evaluate(prediction)
print("Test Error = %g " % (1.0 - accuracy))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment