Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. from pyspark.ml.evaluation import BinaryClassificationEvaluator
  2.  
  3.  
  4. evaluator = BinaryClassificationEvaluator(
  5. labelCol="indexLabel", rawPredictionCol="features")
  6.  
  7. result_glm = evaluator.evaluate(prediction_glm)
  8. result_gbm = evaluator.evaluate(prediction_gbm)
  9. result_rf = evaluator.evaluate(prediction_rf)
  10.  
  11. print ("GLM: %g nGBM: %g nRF: %g n" %
  12. (result_glm, result_gbm, result_rf))
  13.  
  14. GLM: 0.396855
  15. GBM: 0.396855
  16. RF: 0.396855
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement