jpmml / sklearn2pmml

Python library for converting Scikit-Learn pipelines to PMML
GNU Affero General Public License v3.0
685 stars 113 forks source link

Can sklearn2pmml just for variable transformations be used? #406

Closed jfdatascience closed 8 months ago

jfdatascience commented 8 months ago

Hello everyone,

I have a question if sklearn2pmml can be used just to transform data without using a model.

I tried it but the pmml execution in our system wants to have a model with it. Is there a way around this issue maybe via some kind of identy function or is it just not possible ?

Thanks in advance.

vruusmann commented 8 months ago

I have a question if sklearn2pmml can be used just to transform data without using a model.

Yes it can.

For example, recent SkLearn2PMML package versions can convert standalone sklearn_pandas.DataFrameMapper and sklearn.compose.ColumnTransformer objects into PMML documents without problems. There is no need for an accompanying model, nor a (PMML)Pipeline wrapper.

I tried it but the pmml execution in our system wants to have a model with it.

Must be a very outdated SkLearn2PMML package version.

Is there a way around this issue maybe via some kind of identy function or is it just not possible ?

Simply update your SkLearn2PMML package version to the latest. Right now, it should be the 0.101.0 version.