predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel O' Shaughnessy" <danieljamesda...@gmail.com>
Subject Re: SparkContext in predict()
Date Wed, 13 Sep 2017 14:47:55 GMT
....nevermind. Figured it out with PAlgorithm

On Wed, 13 Sep 2017 at 14:20 Daniel O' Shaughnessy <
danieljamesdavid@gmail.com> wrote:

> Hi,
>
> I'm trying to make use of the raw probabilities column in the
> RandomForestClassifierModel from spark (mllib's RandomForestModel doesn't
> have this feature)
>
> import org.apache.spark.ml.classification.{RandomForestClassificationModel,
> RandomForestClassifier}
>
> For this, I need to convert the query to a DataFrame/DataSet Row by
> accessing the sqlContext (built from SparkContext) in the predict method
> but this doesn't seem to be allowed AFAIK.
>
> Is there a way I can save the SparkContext in the model and pull it out
> from the model when needed?
>
> Thanks.
>
>
>

Mime
View raw message