super(resources);
setFunctionSet(new SymbolicRegressionFunctions());
setName("Symbolic regression");
setFileExtension(".dat");
errorThreshold = new DoubleParameter(0.01, "Error threshold") {
@Override
public void validate(Number newValue) {
if (newValue.doubleValue() < 0) {
status = ParameterStatus.INVALID;
status.setDetails("Error threshold must be a positive value.");
} else if (newValue.doubleValue() == 0) {
status = ParameterStatus.WARNING;
status.setDetails("An error threshold of 0 is very rigorous and difficult to achieve.");
} else {
status = ParameterStatus.VALID;
}
}
};
perfectionThreshold = new DoubleParameter(0.000001, "Perfection threshold") {
@Override
public void validate(Number newValue) {
if (newValue.doubleValue() < 0) {
status = ParameterStatus.INVALID;
status.setDetails("Perfection threshold must be a positive value.");