> ## 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.

# Weight of Evidence (WoE) Binning

> Transforms continuous features into Weight of Evidence values for credit scorecard development. WoE encoding creates monotonic relationships and handles missing values, essential for building interpretable credit scorecards. [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/ml.json post /quantlib/ml/credit/woe-binning
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/credit/woe-binning:
    post:
      tags:
        - quantlib-ml
      summary: Weight of Evidence (WoE) Binning
      description: >-
        Transforms continuous features into Weight of Evidence values for credit
        scorecard development. WoE encoding creates monotonic relationships and
        handles missing values, essential for building interpretable credit
        scorecards. [Tier: ENTERPRISE, Credits: 10]
      operationId: woe_binning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - feature
                - target
              properties:
                feature:
                  type: array
                  description: Continuous feature values (e.g., income, age, debt ratio)
                  items:
                    type: number
                  example:
                    - 25000
                    - 35000
                    - 45000
                    - 55000
                    - 65000
                    - 75000
                    - 30000
                    - 40000
                target:
                  type: array
                  description: Binary target (0 = good, 1 = bad)
                  items:
                    type: integer
                    enum:
                      - 0
                      - 1
                  example:
                    - 1
                    - 0
                    - 0
                    - 0
                    - 0
                    - 0
                    - 1
                    - 0
                n_bins:
                  type: integer
                  description: Number of bins to create
                  default: 10
                  example: 5
      responses:
        '200':
          description: WoE transformed values
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      woe_values:
                        type: array
                        items:
                          type: number
                        description: WoE transformed values for each observation
                        example:
                          - 0.847
                          - -0.234
                          - -0.456
                          - -0.678
                          - -0.789
                          - -0.912
                          - 0.547
                          - -0.345
                      n_bins:
                        type: integer
                        example: 5
        '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

````