Search in sources :

Example 1 with KiePMMLLinearNorm

use of org.kie.pmml.commons.model.expressions.KiePMMLLinearNorm 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 KiePMMLLinearNorm

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

the class KiePMMLLinearNormInstanceFactoryTest method getKiePMMLLinearNorm.

@Test
public void getKiePMMLLinearNorm() {
    final LinearNorm toConvert = getRandomLinearNorm();
    final KiePMMLLinearNorm retrieved = KiePMMLLinearNormInstanceFactory.getKiePMMLLinearNorm(toConvert);
    commonVerifyKiePMMLLinearNorm(retrieved, toConvert);
}
Also used : InstanceFactoriesTestCommon.commonVerifyKiePMMLLinearNorm(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKiePMMLLinearNorm) KiePMMLLinearNorm(org.kie.pmml.commons.model.expressions.KiePMMLLinearNorm) LinearNorm(org.dmg.pmml.LinearNorm) PMMLModelTestUtils.getRandomLinearNorm(org.kie.pmml.compiler.api.testutils.PMMLModelTestUtils.getRandomLinearNorm) InstanceFactoriesTestCommon.commonVerifyKiePMMLLinearNorm(org.kie.pmml.compiler.commons.factories.InstanceFactoriesTestCommon.commonVerifyKiePMMLLinearNorm) KiePMMLLinearNorm(org.kie.pmml.commons.model.expressions.KiePMMLLinearNorm) Test(org.junit.Test)

Aggregations

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