// as experiments with using simple linear regression to fill
// the missing values that are created by default by the lagging
// process showed inferior performance compared to just letting
// Weka take care of it via mean/mode replacement
for (int i = 0; i < result.numInstances(); i++) {
Instance current = result.instance(i);
if (current.isMissing(attIndex)) {
if (!weka.core.Utils.isMissingValue(lastNonMissing)) {
// Search forward to the next non missing value (if any)
double futureNonMissing = weka.core.Utils.missingValue();