AWS EC2 Spark / Hadoop cluster.
The following baisc K-Means sparklyr code worked with Spark 2.0.1
kmeans_model <- iris_tbl %>%
select(Petal_Width, Petal_Length) %>%
ml_kmeans(centers = 3)
I've upgraded to Spark 2.1.1, and I get this error
Error: java.lang.IllegalArgumentException: Field "features" does not exist.
at org.apache.spark.sql.types.StructType$$anonfun$apply$1.apply(StructType.scala:264)
at org.apache.spark.sql.types.StructType$$anonfun$apply$1.apply(StructType.scala:264)
...
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
I've made some tests with the code
kmeans_model <- iris_tbl %>%
select(Petal_Width, Petal_Length) %>%
ml_kmeans(k = 3, features = c("Petal_Length", "Petal_Width"))
or
kmeans_model <- iris_tbl %>%
dplyr::select(Petal_Width, Petal_Length) %>%
ml_kmeans(centers = 3, features = c("Petal_Length", "Petal_Width"))
But still get the same error.