[ https://issues.apache.org/jira/browse/SPARK-12367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15060720#comment-15060720 ]
Joseph K. Bradley commented on SPARK-12367: ------------------------------------------- This is likely caused by a feature value 1.0 which did not appear in the training data. That prevents VectorIndexer from knowing about that value, so it does not have a corresponding index when trying to transform the test data. It will be handled by [SPARK-12375]. > NoSuchElementException during prediction with Random Forest Regressor > --------------------------------------------------------------------- > > Key: SPARK-12367 > URL: https://issues.apache.org/jira/browse/SPARK-12367 > Project: Spark > Issue Type: Bug > Components: ML > Affects Versions: 1.5.2 > Reporter: Eugene Morozov > Attachments: CodeThatGivesANoSuchElementException.java, > complete-stack-trace.log, input.gz > > > I'm consistently getting "java.util.NoSuchElementException: key not found: > 1.0" while trying to do a prediction on a trained model. > I use ml package - Pipeline API. The model is successfully trained, I see > some stats in the output: total, findSplitsBins, findBestSplits, > chooseSplits. I can even serialize it into a file and use afterwards, but the > prediction is broken somehow. > Code, input data and stack trace attached. -- 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