> ## 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 are the predictions: hold out the latest examples and score them



## OpenAPI

````yaml /api-reference/openapi.json post /v1/databases/{database_id}/evaluate
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/databases/{database_id}/evaluate:
    post:
      summary: >-
        How good are the predictions: hold out the latest examples and score
        them
      operationId: evaluate_database_v1_databases__database_id__evaluate_post
      parameters:
        - name: database_id
          in: path
          required: true
          schema:
            type: string
            title: Database Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DbEvaluateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DbEvaluateRequest:
      properties:
        entity_table:
          type: string
          title: Entity Table
          description: The table whose rows get an answer (customers, drivers, posts).
          examples:
            - customers
        entity_column:
          type: string
          title: Entity Column
          description: >-
            The column of the examples and of the rows to predict that holds the
            entity table's primary key.
          examples:
            - customer_id
        time_column:
          type: string
          title: Time Column
          description: >-
            The column of the examples and of the rows to predict that holds the
            date.
          examples:
            - date
        target:
          type: string
          title: Target
          description: The column of the examples that holds the answer.
          examples:
            - spend_next_30_days
        task:
          type: string
          enum:
            - classification
            - regression
          title: Task
          description: >-
            'classification' (a category: will the customer buy) or 'regression'
            (a number: how much).
        window_days:
          type: number
          exclusiveMinimum: 0
          title: Window Days
          description: >-
            The answer is about the window_days days after the date; an
            example's answer is known that long after its date.
          examples:
            - 30
        exclude_columns:
          items:
            type: string
          type: array
          title: Exclude Columns
          description: >-
            'table.column' entries the model must not read (a column that holds
            the answer itself).
          examples:
            - - customers.lifetime_value
        examples:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Examples
          description: >-
            Labelled examples. Those of the latest dates are held out and
            predicted from the earlier ones.
        holdout:
          type: number
          maximum: 0.5
          minimum: 0.05
          title: Holdout
          description: >-
            About this share of the examples is held out (whole dates, the
            latest).
          default: 0.2
      type: object
      required:
        - entity_table
        - entity_column
        - time_column
        - target
        - task
        - window_days
        - examples
      title: DbEvaluateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  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.