@Test public void validateNormalizationMethodInvalid() { for(RegressionModel.NormalizationMethod normalizationMethod : RegressionModel.NormalizationMethod.values()) { if (!VALID_NORMALIZATION_METHODS.contains(normalizationMethod)) { try { PROVIDER.validateNormalizationMethod(normalizationMethod); fail("Expecting failure due to invalid normalization method " + normalizationMethod); } catch (KiePMMLException e) { } } } }
void validateNormalizationMethod(RegressionModel.NormalizationMethod toValidate) { switch (toValidate) { case NONE: case SOFTMAX: case LOGIT: case EXP: case PROBIT: case CLOGLOG: case LOGLOG: case CAUCHIT: return; default: throw new KiePMMLException(INVALID_NORMALIZATION_METHOD + toValidate); } }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { void validateNormalizationMethod(RegressionModel.NormalizationMethod toValidate) { switch (toValidate) { case NONE: case SOFTMAX: case LOGIT: case EXP: case PROBIT: case CLOGLOG: case LOGLOG: case CAUCHIT: return; default: throw new KiePMMLException(INVALID_NORMALIZATION_METHOD + toValidate); } } }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { void validateNormalizationMethod(RegressionModel.NormalizationMethod toValidate) { switch (toValidate) { case NONE: case SOFTMAX: case LOGIT: case EXP: case PROBIT: case CLOGLOG: case LOGLOG: case CAUCHIT: return; default: throw new KiePMMLException(INVALID_NORMALIZATION_METHOD + toValidate); } }  }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { void validateNormalizationMethod(RegressionModel.NormalizationMethod toValidate) { switch (toValidate) { case NONE: case SOFTMAX: case LOGIT: case EXP: case PROBIT: case CLOGLOG: case LOGLOG: case CAUCHIT: return; default: throw new KiePMMLException(INVALID_NORMALIZATION_METHOD + toValidate); } }  @Override PMML_MODEL getPMMLModelType(); @Override KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); @Override KiePMMLRegressionModel getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); }
RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> { void validateNormalizationMethod(RegressionModel.NormalizationMethod toValidate) { switch (toValidate) { case NONE: case SOFTMAX: case LOGIT: case EXP: case PROBIT: case CLOGLOG: case LOGLOG: case CAUCHIT: return; default: throw new KiePMMLException(INVALID_NORMALIZATION_METHOD + toValidate); } }  @Override PMML_MODEL getPMMLModelType(); @Override KiePMMLRegressionModel getKiePMMLModel(final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder); @Override KiePMMLRegressionModel getKiePMMLModelFromPlugin(final String packageName, final DataDictionary dataDictionary, final TransformationDictionary transformationDictionary, final RegressionModel model, final Object kBuilder);  }