@Override
public IModel getModel(List<ValidObservation> obs) {
IModel model = null;
IPolynomialFitter polynomialFitter = new TSPolynomialFitter(obs);
int minDegree = polynomialFitter.getMinDegree();
int maxDegree = polynomialFitter.getMaxDegree();
PolynomialDegreeDialog dialog = new PolynomialDegreeDialog(minDegree,
maxDegree);
if (!dialog.isCancelled()) {
polynomialFitter.setDegree(dialog.getDegree());
model = polynomialFitter;
}
return model;
}