H Binod,
>
> However, I am wondering if there is an easy way to read
> the saved scikit-learn model, and convert it to PMML pipeline
>
You're looking for the 'sklearn2pmml.make_pmml_pipeline' function:
https://github.com/jpmml/sklearn2pmml/blob/master/sklearn2pmml/__init__.py#L107-L128
Example:
<python>
from sklearn2pmml import make_pmml_pipeline, sklearn2pmml
obj = joblib.load("/path/to/model.pkl")
pmml_pipeline = make_pmml_pipeline(obj)
sklearn2pmml(pmml_pipeline, "/path/to/model.pmml")
</python>
The unpickled object could be a standalone model, or a pipeline
(transformers and a model). However, in order to make the generated
PMML document more informative, you should supply the names of input
and result fields using the 'active_fields' and 'target_fields'
parameters, respectively.
Also see slides 7 and 8 here:
https://www.slideshare.net/VilluRuusmann/converting-scikitlearn-to-pmml
VR