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

# Full Calibration Report

> Comprehensive calibration metrics including Brier score, Hosmer-Lemeshow test, and Spiegelhalter Z-statistic. Essential for validating that predicted probabilities match observed frequencies. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/ml.json post /quantlib/ml/validation/calibration-report
openapi: 3.1.0
info:
  title: FinceptQuantLib API - ML
  description: >-
    Machine Learning and Credit Risk module endpoints for FinceptQuantLib API.
    Pro Tier access required (5 credits per request). Covers credit scoring,
    model validation, regression models, clustering, anomaly detection, feature
    engineering, and preprocessing.
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-ml
    description: Machine Learning and Credit Risk Analytics
    x-displayName: ML
paths:
  /quantlib/ml/validation/calibration-report:
    post:
      tags:
        - quantlib-ml
      summary: Full Calibration Report
      description: >-
        Comprehensive calibration metrics including Brier score, Hosmer-Lemeshow
        test, and Spiegelhalter Z-statistic. Essential for validating that
        predicted probabilities match observed frequencies. [Tier: ENTERPRISE,
        Credits: 10]
      operationId: calibration_report
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - y_true
                - y_score
              properties:
                y_true:
                  type: array
                  description: True binary labels
                  items:
                    type: integer
                    enum:
                      - 0
                      - 1
                  example:
                    - 0
                    - 0
                    - 1
                    - 1
                    - 0
                    - 1
                    - 0
                    - 1
                    - 0
                    - 0
                y_score:
                  type: array
                  description: Predicted probabilities
                  items:
                    type: number
                  example:
                    - 0.12
                    - 0.18
                    - 0.73
                    - 0.89
                    - 0.22
                    - 0.81
                    - 0.15
                    - 0.88
                    - 0.09
                    - 0.14
      responses:
        '200':
          description: Calibration metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      brier_score:
                        type: number
                        description: Brier score (lower is better, 0-1)
                        example: 0.123
                      hosmer_lemeshow_statistic:
                        type: number
                        description: Hosmer-Lemeshow chi-square statistic
                        example: 8.45
                      hosmer_lemeshow_pvalue:
                        type: number
                        description: P-value (>0.05 indicates good calibration)
                        example: 0.391
                      spiegelhalter_z:
                        type: number
                        description: Spiegelhalter Z-statistic
                        example: 0.67
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientCreditsError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientCreditsError:
      description: Insufficient credits for this operation
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Insufficient credits. This endpoint requires 5 credits.
    ValidationError:
      description: Request validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items:
                        type: string
                    msg:
                      type: string
                    type:
                      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````