class RegressionModelImplementationProvider implements ModelImplementationProvider<RegressionModel, KiePMMLRegressionModel> {

    protected void validate(final DataDictionary dataDictionary, final RegressionModel toValidate) {
        if (toValidate.getRegressionTables() == null || toValidate.getRegressionTables().isEmpty()) {
            throw new KiePMMLException("At least one RegressionTable required");
        }
        if (isRegression(toValidate)) {
            List<KiePMMLNameOpType> targetFields = getTargetFields(dataDictionary, toValidate);
            validateRegression(targetFields, toValidate);
        } else {
            validateClassification(dataDictionary, toValidate);
        }
    }

}