Skip to content

Conversation

@pabloem
Copy link
Contributor

@pabloem pabloem commented Nov 3, 2025

Implement a function to predict values for timeseries based on linear regression.
This PR depends on #137142 - which implements the deriv function.

Equivalent promql function: https://prometheus.io/docs/prometheus/latest/querying/functions/#predict_linear

This change:

  • slightly modifies the underlying implementation of Deriv to take in a function to decide how to deal with linear regression prediction
  • It relies on a window's last sample to predict the next upcoming value, so the result depends on the data distribution of the window.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.3.0 labels Nov 3, 2025
@pabloem pabloem added >feature :StorageEngine/TSDB You know, for Metrics Team:StorageEngine and removed needs:triage Requires assignment of a team area label labels Nov 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@pabloem pabloem requested a review from dnhatn November 6, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants