Skip to content
HALOWERK

Denkwerk

dataset split

Assigns each row to train, validation or test using the given fractions and a seeded generator, so the same input and seed always give the same split. With a label field the split is stratified per label; with a group field all rows of one group (for example one customer or one document) land in the same split to prevent leakage. Returns row indices per split and label counts per split.

POST https://denk.halowerk.com/v1/dataset-split

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
rowsarrayYes
fractionsobjectNo
label_fieldstringNo
group_fieldstringNo
seedstringNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "rows"
  ],
  "properties": {
    "rows": {
      "type": "array",
      "minItems": 3,
      "maxItems": 200000,
      "items": {
        "type": "object"
      }
    },
    "fractions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "train": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "validation": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "test": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "default": {
        "train": 0.8,
        "validation": 0.1,
        "test": 0.1
      }
    },
    "label_field": {
      "type": "string",
      "maxLength": 100
    },
    "group_field": {
      "type": "string",
      "maxLength": 100
    },
    "seed": {
      "type": "string",
      "maxLength": 100,
      "default": "42"
    }
  }
}

Open original schema

Published input example

{
  "rows": [
    {
      "text": "a",
      "label": "x"
    },
    {
      "text": "b",
      "label": "x"
    },
    {
      "text": "c",
      "label": "y"
    },
    {
      "text": "d",
      "label": "y"
    }
  ],
  "fractions": {
    "train": 0.5,
    "validation": 0,
    "test": 0.5
  },
  "label_field": "label"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’