Skip to content
HALOWERK

Datenvertragswerk

tree isotonic regression

Compute the unique weighted least-squares fit on a captured rooted tree: minimize sum weights[i]*(fit[i]-values[i])^2 subject to fit[parent[i]] <= fit[i]. Return the entire fit and objective as reduced numerator/denominator strings, maximal connected equal-value blocks, and exact nonnegative KKT edge multipliers for the unhalved objective. Multipliers are indexed by child; root entry is zero. Nodes are numbered in ancestor-first order: parents[0]=-1 and 0<=parents[i]<i. Arrays have equal.

POST https://datenvertrag.halowerk.com/v1/tree-isotonic-regression

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
treeSee schemaYes
claimSee schemaYes
Show full input schema
{
  "type": "object",
  "properties": {
    "tree": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "parents": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": -1,
                "maximum": 9
              },
              "minItems": 1,
              "maxItems": 10
            },
            "values": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": -1000000,
                "maximum": 1000000
              },
              "minItems": 1,
              "maxItems": 10
            },
            "weights": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "minItems": 1,
              "maxItems": 10
            }
          },
          "required": [
            "parents",
            "values",
            "weights"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^-?[0-9]+/[1-9][0-9]*$",
            "maxLength": 80
          },
          "minItems": 1,
          "maxItems": 10
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "tree",
    "claim"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "tree": {
    "parents": [
      -1,
      0,
      0
    ],
    "values": [
      3,
      0,
      4
    ],
    "weights": [
      1,
      2,
      1
    ]
  },
  "claim": [
    "1/1",
    "1/1",
    "4/1"
  ]
}

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 โ†’