machine learning - Spark (1.6) ML Linear Regression - how to predict w/ a model -


i have working linear regression model:

lrmodel org.apache.spark.ml.regression.linearregressionmodel 

and have data in dataframe:

data org.apache.spark.sql.dataframe = [label: double, features: vector] 

how use model predict? in case, want like:

lrmodel.predict(data)  // doesn't work 

then compare expected value (label) predicted value

to predict need have dataframe, , convert using transform method part of ml models. note of them require dataframes have same structure of training data, hence fetures column.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -