> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tabsutra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How good the forecasts are: hold out the last steps and score them

> Holds out the last `horizon` steps of every series, forecasts them from the history before, and scores them (MASE, weighted quantile loss, MAE, RMSE, interval coverage) against a seasonal naive forecast.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/evaluate-forecast
openapi: 3.1.0
info:
  title: tabSutra API
  version: '1.0'
  description: >-
    One pretrained model for forecasting, classification, regression and
    recommendation on tables and databases.
servers:
  - url: https://api.tabsutra.com
security:
  - bearerAuth: []
paths:
  /v1/evaluate-forecast:
    post:
      summary: 'How good the forecasts are: hold out the last steps and score them'
      description: >-
        Holds out the last `horizon` steps of every series, forecasts them from
        the history before, and scores them (MASE, weighted quantile loss, MAE,
        RMSE, interval coverage) against a seasonal naive forecast.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForecastEvaluateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
        '400':
          description: An error
          content:
            application/json:
              schema:
                type: object
        '422':
          description: An error
          content:
            application/json:
              schema:
                type: object
components:
  schemas:
    ForecastEvaluateRequest:
      type: object
      title: ForecastEvaluateRequest
      required:
        - rows
        - time_column
        - target
        - horizon
      properties:
        rows:
          type: array
          items:
            additionalProperties: true
            type: object
          title: Rows
          description: >-
            The history: one row per series and step, with the target and any
            other inputs.
        series_column:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Series Column
          description: >-
            The column, or the columns, that identify a series (store and item).
            Leave out for one series.
          examples:
            - - store
              - sku
        time_column:
          type: string
          title: Time Column
          description: The date or time of each step.
          examples:
            - date
        target:
          type: string
          title: Target
          description: The column to forecast.
          examples:
            - units
        horizon:
          type: integer
          minimum: 1
          title: Horizon
          description: The number of steps to forecast.
          examples:
            - 28
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Frequency
          description: >-
            The step: H, D, W, M, Q, Y, or a multiple such as 15min. Default:
            inferred from the history.
        column_types:
          additionalProperties:
            type: string
            enum:
              - number
              - category
              - date
              - text
              - image
              - audio
              - document
              - embedding
              - id
              - ignore
          type: object
          title: Column Types
          description: >-
            Override the inferred type of a column: number, category, date,
            text, image, audio or document (a link to a file), embedding (a list
            of numbers), id (never read) or ignore.
          examples:
            - postcode: category
              remarks: text
              photo_url: image
        windows:
          type: integer
          default: 1
          minimum: 1
          maximum: 20
          title: Windows
          description: >-
            Repeat the test from this many start dates, each one horizon
            earlier, and average the scores.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as ''Authorization: Bearer <key>''.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.