← Agent Data Hub · Search endpoints · /llms.txt

AI Linear Regression (OLS), R-Squared & Time-Series Trend Forecaster

Fits an Ordinary Least Squares (OLS) linear regression line to a time series, calculates R² goodness-of-fit, and forecasts the next N future steps.

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/ai-tool-linear-regression-forecaster?y=100,118,135,154,172&steps=3&compact=1

Full metadata: without compact=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"ai-tool-linear-regression-forecaster"}

Parameters

yComma-separated series values e.g. 100,118,135,154,172
stepsFuture steps to forecast (default 3)

Example response (live, compact)

{
  "apiId": "ai-tool-linear-regression-forecaster",
  "data_freshness": "live",
  "data": {
    "tool": "ai-tool-linear-regression-forecaster",
    "observations": 5,
    "slope_m": 18,
    "intercept_b": 81.8,
    "r_squared_fit": 0.999753,
    "equation": "y = 18.0000*x + 81.8000",
    "future_forecasts": [
      {
        "step": 6,
        "predicted_value": 189.8
      },
      {
        "step": 7,
        "predicted_value": 207.8
      },
      {
        "step": 8,
        "predicted_value": 225.8
      }
    ]
  },
  "source": "100% Platform-Native Deterministic AI Core Utility (<1ms)",
  "license": "100% Platform-Owned Deterministic Algorithm (Commercial Use Allowed)"
}

Source & license

Source100% Platform-Native Deterministic AI Core Utility (<1ms)
License100% Platform-Owned Deterministic Algorithm (Commercial Use Allowed)
Source URLhttps://api-hub.internal/ai-core-tools/ai-tool-linear-regression-forecaster
Termshttps://opensource.org/licenses/MIT
CategoryDeveloper, Tech & Web › AI Core Daily Tools