Search in sources :

Example 1 with ResultField

use of org.jpmml.evaluator.ResultField in project jpmml-sparkml by jpmml.

the class AssociationRulesTest method evaluateFPGrowthShopping.

@Test
public void evaluateFPGrowthShopping() throws Exception {
    Predicate<ResultField> predicate = (resultField -> true);
    Equivalence<Object> equivalence = getEquivalence();
    try (SparkMLTestBatch batch = (SparkMLTestBatch) createBatch(FP_GROWTH, SHOPPING, predicate, equivalence)) {
        PMML pmml = batch.getPMML();
        Model model = Iterables.getOnlyElement(pmml.getModels());
        assertTrue(model instanceof AssociationModel);
    }
}
Also used : Model(org.dmg.pmml.Model) AssociationModel(org.dmg.pmml.association.AssociationModel) PMML(org.dmg.pmml.PMML) ResultField(org.jpmml.evaluator.ResultField) AssociationModel(org.dmg.pmml.association.AssociationModel) Test(org.junit.Test)

Aggregations

Model (org.dmg.pmml.Model)1 PMML (org.dmg.pmml.PMML)1 AssociationModel (org.dmg.pmml.association.AssociationModel)1 ResultField (org.jpmml.evaluator.ResultField)1 Test (org.junit.Test)1