Search in sources :

Example 1 with KiePMMLNormContinuous

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

the class KiePMMLNormContinuousInstanceFactory method getKiePMMLNormContinuous.

static KiePMMLNormContinuous getKiePMMLNormContinuous(final NormContinuous normContinuous) {
    final List<KiePMMLLinearNorm> linearNorms = normContinuous.hasLinearNorms() ? getKiePMMLLinearNorms(normContinuous.getLinearNorms()) : Collections.emptyList();
    final OUTLIER_TREATMENT_METHOD outlierTreatmentMethod = normContinuous.getOutliers() != null ? OUTLIER_TREATMENT_METHOD.byName(normContinuous.getOutliers().value()) : null;
    return new KiePMMLNormContinuous(normContinuous.getField().getValue(), getKiePMMLExtensions(normContinuous.getExtensions()), linearNorms, outlierTreatmentMethod, normContinuous.getMapMissingTo());
}
Also used : OUTLIER_TREATMENT_METHOD(org.kie.pmml.api.enums.OUTLIER_TREATMENT_METHOD) KiePMMLLinearNorm(org.kie.pmml.commons.model.expressions.KiePMMLLinearNorm) KiePMMLNormContinuous(org.kie.pmml.commons.model.expressions.KiePMMLNormContinuous)

Example 2 with KiePMMLNormContinuous

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

the class KiePMMLNormContinuousInstanceFactoryTest method getKiePMMLNormContinuous.

@Test
public void getKiePMMLNormContinuous() {
    final NormContinuous toConvert = getRandomNormContinuous();
    final KiePMMLNormContinuous retrieved = KiePMMLNormContinuousInstanceFactory.getKiePMMLNormContinuous(toConvert);
    commonVerifyKiePMMLNormContinuous(retrieved, toConvert);
}
Also used : KiePMMLNormContinuous(org.kie.pmml.commons.model.expressions.KiePMMLNormContinuous) InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous) PMMLModelTestUtils.getRandomNormContinuous(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomNormContinuous) NormContinuous(org.dmg.pmml.NormContinuous) KiePMMLNormContinuous(org.kie.pmml.commons.model.expressions.KiePMMLNormContinuous) InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous) Test(org.junit.Test)

Aggregations

KiePMMLNormContinuous (org.kie.pmml.commons.model.expressions.KiePMMLNormContinuous)2 NormContinuous (org.dmg.pmml.NormContinuous)1 Test (org.junit.Test)1 OUTLIER_TREATMENT_METHOD (org.kie.pmml.api.enums.OUTLIER_TREATMENT_METHOD)1 KiePMMLLinearNorm (org.kie.pmml.commons.model.expressions.KiePMMLLinearNorm)1 PMMLModelTestUtils.getRandomNormContinuous (org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomNormContinuous)1 InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous (org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKiePMMLNormContinuous)1