[ 
https://issues.apache.org/jira/browse/SPARK-16993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415063#comment-15415063
 ] 

Dulaj Rajitha commented on SPARK-16993:
---------------------------------------

When using the RandomForestRegressor.
I trained using a dataframe with the label column and got a model.
by: model = regressor.fit(trainData)

But my test data does not have a label column. (Since this is the column I need 
to be prediicted).
therefore when transforming I got a error.
model.transform(test)

> model.transform without label column in random forest regression
> ----------------------------------------------------------------
>
>                 Key: SPARK-16993
>                 URL: https://issues.apache.org/jira/browse/SPARK-16993
>             Project: Spark
>          Issue Type: Question
>          Components: Java API, ML
>            Reporter: Dulaj Rajitha
>
> I need to use a separate data set to prediction (Not as show in example's 
> training data split).
> But those data do not have the label column. (Since these data are the data 
> that needs to be predict the label).
> but model.transform is informing label column is missing.
> org.apache.spark.sql.AnalysisException: cannot resolve 'label' given input 
> columns: [id,features,prediction]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to