Search in sources :

Example 21 with KiePMMLFieldRef

use of org.kie.pmml.commons.model.expressions.KiePMMLFieldRef in project drools by kiegroup.

the class KiePMMLAttributeTest method getKiePMMLComplexPartialScore.

private KiePMMLComplexPartialScore getKiePMMLComplexPartialScore() {
    // <ComplexPartialScore>
    // <Apply function="/">
    // <FieldRef>PARAM_1</FieldRef>
    // <FieldRef>PARAM_2</FieldRef>
    // </Apply>
    // </ComplexPartialScore>
    final KiePMMLFieldRef kiePMMLFieldRef1 = new KiePMMLFieldRef(PARAM_1, Collections.emptyList(), null);
    final KiePMMLFieldRef kiePMMLFieldRef2 = new KiePMMLFieldRef(PARAM_2, Collections.emptyList(), null);
    final KiePMMLApply kiePMMLApply = KiePMMLApply.builder("NAME", Collections.emptyList(), "/").withKiePMMLExpressions(Arrays.asList(kiePMMLFieldRef1, kiePMMLFieldRef2)).build();
    return new KiePMMLComplexPartialScore(CUSTOM_FIELD, Collections.emptyList(), kiePMMLApply);
}
Also used : KiePMMLApply(org.kie.pmml.commons.model.expressions.KiePMMLApply) KiePMMLFieldRef(org.kie.pmml.commons.model.expressions.KiePMMLFieldRef)

Aggregations

KiePMMLFieldRef (org.kie.pmml.commons.model.expressions.KiePMMLFieldRef)21 Test (org.junit.Test)20 CommonTestingUtility.getProcessingDTO (org.kie.pmml.commons.CommonTestingUtility.getProcessingDTO)15 KiePMMLApply (org.kie.pmml.commons.model.expressions.KiePMMLApply)15 ProcessingDTO (org.kie.pmml.commons.model.ProcessingDTO)13 KiePMMLTestingModel (org.kie.pmml.commons.testingutility.KiePMMLTestingModel)8 PMML4Result (org.kie.api.pmml.PMML4Result)7 KiePMMLOutputField (org.kie.pmml.commons.model.KiePMMLOutputField)7 KiePMMLConstant (org.kie.pmml.commons.model.expressions.KiePMMLConstant)7 KiePMMLTransformationDictionary (org.kie.pmml.commons.transformations.KiePMMLTransformationDictionary)7 KiePMMLDerivedField (org.kie.pmml.commons.transformations.KiePMMLDerivedField)5 KiePMMLNameValue (org.kie.pmml.commons.model.tuples.KiePMMLNameValue)4 KiePMMLDefineFunction (org.kie.pmml.commons.transformations.KiePMMLDefineFunction)4 KiePMMLLocalTransformations (org.kie.pmml.commons.transformations.KiePMMLLocalTransformations)3 KiePMMLParameterField (org.kie.pmml.commons.transformations.KiePMMLParameterField)2 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1