我想在流水线阶段添加stringindexer和onehotencoder(例如标签)。我已经通过以下方式完成:
pipeline_all = Pipeline(stages=[stringindexer_stages + onehotencoder_stages,stringindexer_label ,assembler, rf])
但是,python向我返回以下错误:
stages = [stage.copy(extra) for stage in that.getStages()]
TypeError: copy() takes no arguments (1 given)