this.obs = obs;
}
// Create a model representing a polynomial fit of the requested degree.
IModel createModel() {
IModel model = null;
final double zeroPoint = DescStats.calcTimeElementMean(obs,
JDTimeElementEntity.instance);
int minDegree = getMinDegree();
int maxDegree = getMaxDegree();
PolynomialDegreeDialog polyDegreeDialog = new PolynomialDegreeDialog(
minDegree, maxDegree);
if (!polyDegreeDialog.isCancelled()) {
setDegree(polyDegreeDialog.getDegree());
final AbstractLeastSquaresOptimizer optimizer = new LevenbergMarquardtOptimizer();
final PolynomialFitter fitter = new PolynomialFitter(
getDegree(), optimizer);
model = new IModel() {
boolean interrupted = false;
List<ValidObservation> fit;
List<ValidObservation> residuals;
PolynomialFunction function;
// ICoordSource coordSrc = JDCoordSource.instance;