Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pyspark.ml.evaluation import BinaryClassificationEvaluator
- evaluator = BinaryClassificationEvaluator(
- labelCol="indexLabel", rawPredictionCol="features")
- result_glm = evaluator.evaluate(prediction_glm)
- result_gbm = evaluator.evaluate(prediction_gbm)
- result_rf = evaluator.evaluate(prediction_rf)
- print ("GLM: %g nGBM: %g nRF: %g n" %
- (result_glm, result_gbm, result_rf))
- GLM: 0.396855
- GBM: 0.396855
- RF: 0.396855
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement