Closed jesusvasquezdeveloper closed 3 years ago
Is there any other straight way to discretize dataframe columns
You could calculate bin thresholds manually, and then construct a sklearn2pmml.preprocessing.CutTransformer
(a wrapper around the pandas.cut
function):
https://github.com/jpmml/sklearn2pmml/blob/master/sklearn2pmml/preprocessing/__init__.py#L52-L66
Why are you using two separate DataFrameMapper
instances (and joining them using FeatureUnion
afterwards)? A single DataFrameMapper
instance can hold mappings both for continuous and categorical columns.
Hi, I'm using sklearn2pmml to persist a simple model.
As always i divide my data into categorical and numeric features and apply the respective preprocessing step to each. Note that i need to discretize all of my numeric variables .I manage to preprocess my data and fit the algorithm. But when i try to persist the model, the code yields this exception.
Is there any other straight way to discretize dataframe columns in PMMLPipeline?