---
title: "Returns statistics of the dataset that would be created with these parameters"
method: POST
path: "/classifier/project/{proj_id}/dataset-statistics"
tags: ["classifier"]
---

# Returns statistics of the dataset that would be created with these parameters

`POST /classifier/project/{proj_id}/dataset-statistics`

## Path parameters

- `proj_id` integer, required

## Request body

- ClassifierDatasetStatisticsRequest
  - `tag_ids` integer[], required — IDs of document tags that select the dataset's source documents
  - `user_ids` integer[], required — IDs of annotators whose annotations should be used for sentence and span classification; ignored for document classification
  - `merge_children_into_parent` boolean, required — Whether annotations of descendant codes should count toward their selected parent code; only applies to sentence and span classification
  - `model` 'document' | 'sentence' | 'span', required
  - `base_model_name` string, required — Hugging Face base model selected for training. Span statistics use its tokenizer to align word annotations with model tokens; document and sentence statistics currently do not depend on it.
  - `class_ids` integer[], required — Selected tag IDs for document classification or code IDs for sentence and span classification

## Response `200`

Successful Response

- ClassifierDatasetStatistics
  - `total_units` integer, required — Total number of units (tokens / sentences / documents) in the dataset
  - `labeled_units` integer, required — Number of units with a non-O label in the dataset
  - `signal_percentage` number, required — Percentage of labeled units relative to all units (training signal)
  - `signal_strength` 'weak' | 'ok' | 'strong', required
  - `weak_signal_threshold` number, required — Signal percentage below which the training signal is considered weak
  - `strong_signal_threshold` number, required — Signal percentage above which the training signal is considered strong
  - `classes` ClassifierClassStatistics[], required — Statistics per class (tag or code)
    - `class_id` integer, required — ID of the class (tag or code)
    - `num_examples` integer, required — Number of examples for the class (annotations / tagged docs)
    - `num_units` integer, required — Number of units (tokens / sentences / documents) of the class
    - `unit_percentage` number, required — Percentage of units of the class relative to all units
  - `problematic_sdocs` ProblematicSdoc[], required — Documents with a low share of labeled units, sorted by severity
    - `sdoc_id` integer, required — ID of the source document
    - `total_units` integer, required — Total number of units (tokens / sentences / documents)
    - `labeled_units` integer, required — Number of units with a non-O label
    - `labeled_percentage` number, required — Percentage of labeled units relative to all units of the document
  - `unannotated_sdocs` integer[], required — IDs of tag-selected documents without a matching selected class. Span and sentence datasets exclude them; document datasets retain them as O examples

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.net/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/revisions/317c09850114/schema)
