@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)); }
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)); }
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)); } }
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(); }
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); }
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);  }