Re: Status of MLLib exporting models to PMML

2014-11-12 Thread Villu Ruusmann
Hi DB,


DB Tsai wrote
 I also worry about that the author of JPMML changed the license of
 jpmml-evaluator due to his interest of his commercial business, and he
 might change the license of jpmml-model in the future.

I am the principal author of the said Java PMML API projects and I want to
assure you that I have no plans of changing the license of the JPMML-Model
project now or in the future. In fact, most of the codebase is copyrighted
by University of Tartu, so I can not do it even if I wanted to.

I would also like to clarify the licensing of the JPMML-Evaluator project.
This is a fork of the legacy JPMML project (https://github.com/jpmml/jpmml),
which was started in early 2014 in order to provide support for the PMML
specification version 4.2, implement missing functionality and do other
enhancements. The project was initiated with the AGPLv3 license, there have
been no unexpected license changes.

Developing Java PMML APIs is a full-time work for me. If you (or anybody
else) can suggest how I can support myself doing this under some license
other than (A)GPLv3, I'd be interested to find out more. So far, I have
learned that BSD 3-Clause License doesn't work - I've yet to receive a
single thank you message for my previous work in this field, and many
other fields.


VR



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Status-of-MLLib-exporting-models-to-PMML-tp18514p18729.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: pmml with augustus

2014-06-11 Thread Villu Ruusmann
Hello Spark/PMML enthusiasts,

It's pretty trivial to integrate the JPMML-Evaluator library with Spark. In
brief, take the following steps in your Spark application code:
1) Create a Java Map (arguments) that represents the input data record.
You need to specify a key-value mapping for every active MiningField. The
key type is org.jpmml.evaluator.FieldName. The value type could be String or
any Java primitive data type that can be converted to the requested PMML
type.
2) Obtain an instance of org.jpmml.evaluator.Evaluator. Invoke its
#evaluate(MapFieldName, ?) method using the argument map created in step
1.
3) Process the Java Map (results) that represents the output data record.

Putting it all together:
JavaRDDMaplt;FieldName, String arguments = ...
final ModelEvaluator? modelEvaluator =
(ModelEvaluator?)pmmlManager.getModelManager(null,
ModelEvaluatorFactory.getInstance()); // See the JPMML-Evaluator
documentation
JavaRDDMaplt;FieldName, ? results = arguments.flatMap(new
FlatMapFunctionMaplt;FieldName, String, MapFieldName, ?(){

@Override
public IterableMaplt;FieldName, ? call(MapFieldName, String
arguments){
MapFieldName, ? result = modelEvaluator.evaluate(arguments);
return Collections.Maplt;FieldName, ?singletonList(result);
}
});

Of course, it's not very elegant to be using JavaRDDMaplt;K, V here.
Maybe someone can give me a hint about making it look and feel more Spark-y?

Also, I would like to refute earlier comment by @pacoid, that
JPMML-evaluator compares poorly against Augustus and Zementis products.
First, JPMML-Evaluator fully supports PMML specification versions 3.0
through 4.2. I would specifically stress the support for PMML 4.2, which was
released just a few months ago. Second, JPMML is open source. Perhaps its
licensing terms could be more liberal, but it's nevertheless the most open
and approachable way of bringing Java and PMML together.


VR



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/pmml-with-augustus-tp7313p7412.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.