scikitlearn 1.1.1、XGboost 1.7.6、nyoka 5.5.0、scikitlearn 2pmml 0.94.1
我正在try 运行下面的代码并获取类型错误.
pipeline = PMMLPipeline([("classifier", XGBClassifier(**params))])
pipeline.fit(X_train, y_train)
The error:
TypeError Traceback (most recent call last)
Cell In[28], line 1
----> 1 pipeline.fit(X_train, y_train)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sklearn\base.py:1474, in _fit_context..decorator..wrapper(estimator, *args, **kwargs)
1467 estimator._validate_params()
1469 with config_context(
1470 skip_parameter_validation=(
1471 prefer_skip_nested_validation or global_skip_validation
1472 )
1473 ):
-> 1474 return fit_method(estimator, *args, **kwargs)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\sklearn\pipeline.py:471, in Pipeline.fit(self, X, y, **params)
428 """Fit the model.
429
430 Fit all the transformers one after the other and sequentially transform the
(...)
468 Pipeline with fitted steps.
469 """
470 routed_params = self._check_method_params(method="fit", props=params)
--> 471 Xt = self._fit(X, y, routed_params)
472 with _print_elapsed_time("Pipeline", self._log_message(len(self.steps) - 1)):
473 if self._final_estimator != "passthrough":
类型错误:PMMLPipeline._ fit()需要2到3个位置参数,但给出了4个位置参数
I see from the traceback that there is an extra argument "(self, X, y, **params)" but I run the same sequence of commands for other XGBoost models without problem.
What could be happen?