KiePMMLRegressionModelFactory { static boolean isRegression(final MiningFunction miningFunction, final String targetField, final OpType targetOpType) { return Objects.equals(MiningFunction.REGRESSION, miningFunction) && (targetField == null || Objects.equals(OpType.CONTINUOUS, targetOpType)); } private  KiePMMLRegressionModelFactory(); static KiePMMLRegressionModel getKiePMMLRegressionModelClasses(final DataDictionary dataDictionary,
                                                                          final TransformationDictionary transformationDictionary,
                                                                          final RegressionModel model); static Map<String, String> getKiePMMLRegressionModelSourcesMap(final DataDictionary dataDictionary,
                                                                          final TransformationDictionary transformationDictionary,
                                                                          final RegressionModel model,
                                                                          final String packageName);  }
@Test public void isRegression() { assertTrue(KiePMMLRegressionModelFactory.isRegression(MiningFunction.REGRESSION, null, null)); assertTrue(KiePMMLRegressionModelFactory.isRegression(MiningFunction.REGRESSION, "TARGET", OpType.CONTINUOUS)); assertFalse(KiePMMLRegressionModelFactory.isRegression(MiningFunction.REGRESSION, "TARGET", OpType.CATEGORICAL)); assertFalse(KiePMMLRegressionModelFactory.isRegression(MiningFunction.CLASSIFICATION, null, null)); }