Regressors

What Are Regressors in Time Series Forecasting?

In machine learning, regressors (also called external regressors or exogenous variables) are additional features that help improve the accuracy of a model’s predictions. They represent outside influences—factors that may not be part of your target or time column, but that still affect the outcome you’re trying to forecast.

For time series models, regressors are often used to account for real-world conditions that can influence trends. These might include:

  • Marketing Spend (e.g., ad campaigns that drive demand)

  • Weather Conditions (e.g., temperature affecting ice cream sales)

  • Holiday Flags or Events (e.g., Black Friday spikes)

  • Competitor Pricing or economic indicators

  • Stock Levels, seasonal promotions, or other business-specific signals


Why Use Regressors?

Adding regressors allows your time series model to go beyond simply looking at past values. Instead, it starts to understand the why behind patterns. Benefits include:

  • Improved Forecast Accuracy: The model can better explain variations in the data.

  • Causal Insights: You get clearer visibility into which external factors are driving changes.

  • Smarter Planning: You can simulate what might happen if certain inputs (like budget or weather) change in the future.


When Should You Use Regressors?

Use regressors when:

  • You know that external factors strongly affect the target value.

  • You want to improve your forecast by modeling the impact of these factors.

  • You can provide future values for the regressors during prediction (important!).

For example, if you’re forecasting product demand and you know that advertising spend or pricing will change next month, including those as regressors gives the model a much better chance of anticipating that change.


Frequency Alignment: Matching Regressors to Your Model’s Time Granularity

Every regressor must supply exactly one value for each timestamp in your target series—no more, no less. Graphite Note enforces this 1:1 rule to ensure your external features line up perfectly with what you’re forecasting.

  • Daily models → one regressor value per date

  • Hourly models → one regressor value per hour

  • Weekly models → one regressor value per week, etc.

If your raw data has a finer granularity than your model (e.g., minute-level web clicks for a daily forecast), you must aggregate it (sum, mean, max, etc.) so each day has a single number. Conversely, you can’t “stretch” a single daily value into multiple hourly slots without interpolation—each timestamp needs its own authentic input. Numerical Regressors (e.g. Cost per Unit)

  • Aggregate before uploading.

  • Choose a summary statistic that fits your use case:

    • Average (mean unit cost)

    • Sum (total cost volume)

    • Max/Min (peak or baseline cost)

  • Result: one number per date (or hour/week) that aligns 1:1 with your target.

Categorical Regressors (e.g. Category Code, Weather Label)

  • Ensure only one category value per timestamp.

  • If multiple occur:

    • Select the most representative label (e.g., “predominant” weather condition),

    • Encode logic-based rules (e.g., if any “Rain” occurs → is_Rain = 1),

    • Or use proportions: % Category A = count(A) ÷ total.

By strictly aligning frequencies—one regressor row for each target timestamp—you eliminate timing mismatches and give your model clean, reliable inputs.


You can select up to 5 regressor columns when training your Time series model in Graphite Note.

Once a model includes regressors, it requires future values of those regressors to make forecasts. Because entering those values manually in the UI isn’t practical, forecasts for Graphite Note models with regressors can only be generated via the Prediction API.

Last updated

Was this helpful?