Closed HelloLadsAndGents closed 3 years ago
The official Scikit-Learn pipeline API won't let you have any transformer steps after the final estimator step.
The sklearn2pmml.pipeline.PMMLPipeline
class extends the base sklearn.pipeline.Pipeline
class with predict_transformer
, predict_proba_transformer
and apply_transformer
attributes:
https://github.com/jpmml/sklearn2pmml/blob/0.61.0/sklearn2pmml/pipeline/__init__.py#L47-L51
See JPMML-SkLearn intergration tests for actual code examples: https://github.com/jpmml/jpmml-sklearn/blob/1.6.4/src/test/resources/main.py
For example: https://github.com/jpmml/jpmml-sklearn/blob/1.6.4/src/test/resources/main.py#L323
Cool, thanks a lot
question:
how can i add another step to deal with the result after ("classifier", classifier) is there something like :
that i can use to deal with the predict res like : 0.131415 because i want to transform it to something like : 100 * 0.131415 + 324
if there is ,how can i get the attribute name and how can i use it?
thanks