You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Rich Kroll <ri...@modernizingmedicine.com> on 2014/07/11 20:48:06 UTC

Top N predictions

Hello all,
In our use case we would like to return top 10 predicted values. I've
looked at NaiveBayes & LogisticRegressionModel and cannot seem to find a
way to get the predicted values for a vector - is this possible with
mllib/spark?

Thanks,
Rich

Re: Top N predictions

Posted by Sean Owen <so...@cloudera.com>.
I don't believe it is. Recently when I needed to do this, I just
copied out the underlying probability / margin function and calculated
it from the model params. It's just a dot product.

On Fri, Jul 11, 2014 at 7:48 PM, Rich Kroll
<ri...@modernizingmedicine.com> wrote:
> Hello all,
> In our use case we would like to return top 10 predicted values. I've looked
> at NaiveBayes & LogisticRegressionModel and cannot seem to find a way to get
> the predicted values for a vector - is this possible with mllib/spark?
>
> Thanks,
> Rich
>