Using CategoricalFeaturesInfo with DecisionTreeClassifier method in Spark

倾然丶 夕夏残阳落幕 提交于 2019-12-02 09:23:16
zero323

You're mixing two different APIs which take different approach to categorical data:

  • RDD based o.a.s.mllib which provides required metadata by passing categoricalFeaturesInfo map.
  • Dataset (DataFrame) o.a.s.ml which is using column metadata to determine variable types. If you correctly use ML transformers to create features this should be handled automatically for you, otherwise you'll have to provide metadata manually.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!