0

As far as I can see, transform method accepts only dataframe. Is there a way to somehow apply model to transform a single vector?

ov7a
  • 1,497
  • 4
  • 15
  • 34

2 Answers2

2

There is not, or at least there is not if you ask about core Spark. Related feature request is tracked by SPARK-10413 and SPARK-10884 but none have seen much progress so far.

There exist external libraries which might address this problem, some mentioned in How to serve a Spark MLlib model?.

0

Try to change the vector to a single row data Frame. And then run the model on it

Debasish
  • 113
  • 1
  • 9