[ https://issues.apache.org/jira/browse/SPARK-10413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853301#comment-15853301 ]
Asher Krim commented on SPARK-10413: ------------------------------------ I know I'm a little late to this discussion, but I'd like to suggest an alternative: Rather than opening up predict, predictRaw, predictProbability, etc., how about adding a new overloaded `transform` for a single input that returns all of them? For models that come to mind the cost of computing additional values is negligible to none. By only adding one new public method we have a simpler API and less debt moving forward. I would love some counterexamples here - if there are models that require an expensive computation path for some but not all of their prediction values this would only be a good idea if we also added knobs to control which are computed [~yanboliang] [~mengxr] [~josephkb] > ML models should support prediction on single instances > ------------------------------------------------------- > > Key: SPARK-10413 > URL: https://issues.apache.org/jira/browse/SPARK-10413 > Project: Spark > Issue Type: Umbrella > Components: ML > Reporter: Xiangrui Meng > Priority: Critical > > Currently models in the pipeline API only implement transform(DataFrame). It > would be quite useful to support prediction on single instance. > UPDATE: This issue is for making predictions with single models. We can make > methods like {{def predict(features: Vector): Double}} public. > * This issue is *not* for single-instance prediction for full Pipelines, > which would require making predictions on {{Row}}s. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org