无法在 Spark 中为决策树保存 PipelineModel
Can't save PipelineModel in Spark for Decision Trees
在尝试保存来自具有一个估算器的管道(决策树)的模型管道时,出现此错误:
Exception in thread "main" java.lang.UnsupportedOperationException: Pipeline write will fail on this Pipeline because it contains a stage which does not implement Writable. Non-Writable stage: dtc_c13531497173 of type class org.apache.spark.ml.classification.DecisionTreeClassificationModel
我在其他估算器中看到了类似的问题,您是否知道对此有任何修复?
谢谢
这不是错误。如果 PipelineModel
包含未实现 MLWritable
.
的阶段,这是正常行为
如何解决?将您的 Spark 安装更新到 2.0+。参见 SPARK-11888
在尝试保存来自具有一个估算器的管道(决策树)的模型管道时,出现此错误:
Exception in thread "main" java.lang.UnsupportedOperationException: Pipeline write will fail on this Pipeline because it contains a stage which does not implement Writable. Non-Writable stage: dtc_c13531497173 of type class org.apache.spark.ml.classification.DecisionTreeClassificationModel
我在其他估算器中看到了类似的问题,您是否知道对此有任何修复?
谢谢
这不是错误。如果 PipelineModel
包含未实现 MLWritable
.
如何解决?将您的 Spark 安装更新到 2.0+。参见 SPARK-11888