Я пытаюсь добавить следующее в качестве этапа к моему конвейеру, и я получаю сообщение об ошибке, может кто-нибудь объяснить мне, как я могу ее решить?
train=model.transform(train_set)
lr = LogisticRegression(maxIter=50, regParam=0.01, aggregationDepth=2, elasticNetParam=0.05,tol=1E-4, fitIntercept=True)
ovr = OneVsRest(classifier=lr)
ovrModel = ovr.fit(train)
model.append_stage(Stage(ovrModel))
Я ожидаю, что он будет работать нормально, ноЯ получаю эту ошибку:
Traceback (most recent call last):
File "type_classifier_pipeline", line 1, in <module>
File "type_classifier_pipeline", line 51, in type_classifier_pipeline
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/foundry_ml_core/stage/_stage.py", line 25, in Stage
return FlexibleStage(model, **parameters)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/foundry_ml_core/stage/flexible/_flexible_stage.py", line 40, in __init__
self.params = process_params(model, param_definition, kwargs)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/foundry_ml_core/stage/flexible/_parameter.py", line 67, in process_params
params[key] = param.default(model)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/foundry_ml_sparkml/parameters.py", line 12, in getter
return model.getOrDefault(name)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/pyspark/ml/param/__init__.py", line 344, in getOrDefault
param = self._resolveParam(param)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/pyspark/ml/param/__init__.py", line 417, in _resolveParam
return self.getParam(param)
File "/tmp/conda-7af962df-a93e-4961-a670-925beb8f225e/real/envs/conda-env/lib/python2.7/site-packages/pyspark/m``l/param/__init__.py", line 301, in getParam
param = getattr(self, paramName)
AttributeError: 'OneVsRestModel' object has no attribute 'probabilityCol'