iamDecode / sklearn-pmml-model

A library to parse and convert PMML models into Scikit-learn estimators.
BSD 2-Clause "Simplified" License
76 stars 15 forks source link

Support implicit feature scaling #32

Open iamDecode opened 2 years ago

iamDecode commented 2 years ago

SVM models exported from R using the e1071 library will apply feature scaling by default, which is also translated into the resulting PMML model. This feature scaling is currently ignored, so users have to scale the features themselves before using the model in Python. To ensure generated models from R can be used directly in Python without addditional steps, its worth checking out whether we can support feature scaling.

I expect the best place to implement this will be setting up the scaler in PMMLBaseEstimator.__init__(), and applying that scaler in PMMLBaseEstimator._prepare_data().