How do I run the Spark decision tree with a categorical feature set using Scala?

后端 未结 3 904
北荒
北荒 2021-02-20 18:53

I have a feature set with a corresponding categoricalFeaturesInfo: Map[Int,Int]. However, for the life of me I cannot figure out how I am supposed to get the DecisionTree class

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 19:18

    You need to confirm the type of array x. From the error log, it said that the item in array x is string which is not supported in spark. Current spark Vectors can only be filled by Double.

提交回复
热议问题