Spark: Column label must be of type DoubleType but was actually StringType

[error] Exception in thread “main” java.lang.IllegalArgumentException: requirement failed: Column label must be of type DoubleType but was actually StringType.

Should use StringIndexer http://spark.apache.org/docs/latest/ml-features.html#stringindexer

 

keywords: spark ml mllib dataframe df apache spark double int to string label output

About Neil Rubens

see http://ActiveIntelligence.org

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*