timesfm icon indicating copy to clipboard operation
timesfm copied to clipboard

Error in the docstring about xreg+timesfm mode

Open AmeyV05 opened this issue 9 months ago • 0 comments

The default option in forecast with covariates method is xreg+timesfm. The docs mention that: 'xreg_mode: one of "xreg + timesfm" or "timesfm + xreg". "xreg + timesfm" fits a model on the residuals of the TimesFM forecast. "timesfm + xreg" fits a model on the targets then forecasts on the residuals via TimesFM.'

However, the function is implemented the other way around.

See L488:494 and L

if xreg_mode == "timesfm + xreg": # For fitting residuals, no TimesFM forecast on the first patch. train_lens.append(max(0, input_len - self.input_patch_len)) elif xreg_mode == "xreg + timesfm": train_lens.append(input_len) else: raise ValueError(f"Unsupported mode: {xreg_mode}")

And: L537 to 585.

AmeyV05 avatar May 13 '25 16:05 AmeyV05