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

# Analyze Bias

> Analyze bias in the dataset.



## OpenAPI

````yaml /api-reference/openapi.json post /api/playground/sessions/{session_id}/bias
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
servers: []
security: []
paths:
  /api/playground/sessions/{session_id}/bias:
    post:
      tags:
        - playground
      summary: Analyze Bias
      description: Analyze bias in the dataset.
      operationId: analyze_bias_api_playground_sessions__session_id__bias_post
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: blindsight_session
          in: cookie
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Blindsight Session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BiasAnalysisRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BiasAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BiasAnalysisRequest:
      properties:
        protected_columns:
          items:
            type: string
          type: array
          minItems: 1
          title: Protected Columns
        target_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Column
      type: object
      required:
        - protected_columns
      title: BiasAnalysisRequest
    BiasAnalysisResponse:
      properties:
        session_id:
          type: string
          title: Session Id
        summary:
          type: object
          title: Summary
        distributions:
          items:
            $ref: '#/components/schemas/BiasDistribution'
          type: array
          title: Distributions
        correlations:
          items:
            $ref: '#/components/schemas/BiasCorrelation'
          type: array
          title: Correlations
        cross_correlations:
          anyOf:
            - $ref: '#/components/schemas/BiasCrossCorrelations'
            - type: 'null'
        recommendations:
          items:
            type: string
          type: array
          title: Recommendations
      type: object
      required:
        - session_id
        - summary
        - distributions
        - correlations
        - recommendations
      title: BiasAnalysisResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BiasDistribution:
      properties:
        column:
          type: string
          title: Column
        distribution:
          additionalProperties:
            type: number
          type: object
          title: Distribution
        entropy:
          type: number
          title: Entropy
        imbalance_ratio:
          type: number
          title: Imbalance Ratio
        category_count:
          type: integer
          title: Category Count
      type: object
      required:
        - column
        - distribution
        - entropy
        - imbalance_ratio
        - category_count
      title: BiasDistribution
    BiasCorrelation:
      properties:
        protected:
          type: string
          title: Protected
        target:
          type: string
          title: Target
        association:
          type: number
          title: Association
        is_concerning:
          type: boolean
          title: Is Concerning
      type: object
      required:
        - protected
        - target
        - association
        - is_concerning
      title: BiasCorrelation
    BiasCrossCorrelations:
      properties:
        columns:
          items:
            type: string
          type: array
          title: Columns
        matrix:
          items:
            items:
              type: number
            type: array
          type: array
          title: Matrix
      type: object
      required:
        - columns
        - matrix
      title: BiasCrossCorrelations
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````