sagemaker-sparkml-serving-container icon indicating copy to clipboard operation
sagemaker-sparkml-serving-container copied to clipboard

Prediction Probability from mleap model deployed on sagemaker

Open janvekarnaveed opened this issue 5 years ago • 2 comments

After deploying mleap model artifact on sagemaker endpoint, during the inferencing stage, how can I get probabilities of prediction rather than binary outcome? I tried changing output column from prediction to probability, but I get the following error: sagemaker: ml.combust.mleap.tensor.DenseTensor cannot be cast to java.lang.Double

Any suggestions?

janvekarnaveed avatar Jun 05 '20 04:06 janvekarnaveed

As far I can tell, you need to change your SparkML Pipeline to return probabilities rather than the outcome and then it can be successfully cast into the DenseTensor object.

orchidmajumder avatar Jun 06 '20 00:06 orchidmajumder

Thanks for the comments, Orchid! I am trying to find documentation around pipeline models returning proababilities, unable to find any good source. Would you happen to have any examples of any spark classification model deployed on sagemaker that returns probabilities?

janvekarnaveed avatar Jun 06 '20 01:06 janvekarnaveed