Skip to content

Instantly share code, notes, and snippets.

View FrieseWoudloper's full-sized avatar

Willy Tadema FrieseWoudloper

View GitHub Profile
@thomasdarimont
thomasdarimont / DynamicPmmlModelSelectionExample.java
Last active March 7, 2021 10:43
Small jpmml-evaulator demo (with a dummy model) on how to dynamically select a regression model based on an input attribute value. In this case we use the "attribute1" to select the right model.
package de.tutorials.training;
import org.dmg.pmml.FieldName;
import org.dmg.pmml.PMML;
import org.jpmml.evaluator.FieldValue;
import org.jpmml.evaluator.ModelEvaluator;
import org.jpmml.evaluator.ModelEvaluatorFactory;
import org.jpmml.manager.PMMLManager;
import org.jpmml.model.ImportFilter;
import org.jpmml.model.JAXBUtil;