Hi Cairu,
>
> I've reviewed sklearn2pmml (
https://github.com/jpmml/sklearn2pmml).
> But I can only find .jar files. So I'm wondering whether there are any source
> code of the real converting process available?
The majority of SkLearn-to-PMML conversion logic is contained in
jpmml-sklearn-1.0-SNAPSHOT.jar and jpmml-converter-1.0.7.jar. Other
JAR files are there to provide various helper functions. For example,
pyrolite-4.12.jar handles the parsing of Python pickle files, and
jcommander-1.48.jar handles the parsing of command-line arguments.
The collection of JAR files in the sklearn2pmml/resources directory is
automatically managed by Apache Maven. For example, if you remove all
of them, then you can get them back by executing "mvn clean package"
in the root directory of the project.
You can find the source code of the JPMML-SkLearn library here:
https://github.com/jpmml/jpmml-sklearn
You can find the source code of all the other libraries in Maven
Central repository:
http://search.maven.org/
For example, if you want to know what's inside
jpmml-converter-1.0.7.jar, then search the Maven Central repository
for "jpmml-converter", click on the search result, and choose the
"sources.jar" download option. This should redirect you to:
http://search.maven.org/remotecontent?filepath=org/jpmml/jpmml-converter/1.0.7/jpmml-converter-1.0.7-sources.jar
> Or, how can I make use of these .jar files?
>
The conversion logic is implemented in Java.
The 'sklearn2pmml()' function builds a command-line command, and
invokes java.exe with it using the 'subprocess.check_call()' function:
https://github.com/jpmml/sklearn2pmml/blob/master/sklearn2pmml/__init__.py
As a Python end user, this "Java connection" shouldn't affect you in
any way (provided that you have Java 1.7+ available on system path).
Simply install the 'sklearn2pmml' package, and start walking through
the Iris classification example as detailed in its README.md file:
https://github.com/jpmml/sklearn2pmml/blob/master/README.md
VR