Styxis
Company
Knowledge

Separate category-code magnitude from tree category cardinality

Before changing original labels to satisfy an error message, establish whether the real limit concerns values or their count.

Large labels are not many categories

Separate the numeric magnitude of original labels from the number of distinct categories. An internal ordinal code in an error message is not a reason to rename meaningful labels. Establish the unit of the actual limit before changing data shared between teams. Place Truthound at the comparison between an externally verified category budget and the actual distinct count. [1, 2, 3]

A follow-up reports a wording change

Scikit-learn #35221 reports that native categorical trees limit category count rather than original label values, with 256 supported for splitter="best". A follow-up maintainer says the wording and check were corrected in #35181. This does not guarantee that every installed version or the random splitter has the same limit. [1]

Fix the version and splitter budget

Record the splitter, verified supporting version, and effective category count. For the approved best path, compare the count with 256 and route excess categories to an explicit grouping policy or another model. Define missing and unseen-category handling separately instead of inferring it from the limit. [1, 3]

The boundary at 256 and 257

The illustrative verified best-path budget is 256 categories. Even if labels start at 1000, an observed count of 256 passes the <=256 condition. A count of 257 fails. The magnitude of a label alone is not a failure under this count contract. [1, 3]

What count comparison leaves out

ColumnPairValidator in Truthound Python SDK 3.3.2 compares operator-extracted observed_distinct_categories with supported_category_budget verified for the relevant stack using <=. Keep missing and unseen-category policies separately. Passing a count does not establish model suitability, category meaning, or support in every tree release. [1, 2, 3]

Alternatives preserving label mappings

Choose task-approved category grouping or another verified estimator while retaining the original-label mapping. Recheck the actual version and splitter after changing paths. A current regression covering that support budget reduces the value of a duplicate audit. [1, 3]

Application conditions

Verify category budgets by actual supporting version and splitter, including missing and unseen-category policies.

Alternatives

Use approved grouping or another estimator with the original-label mapping.

Limitations

  • Passing the count does not establish label meaning, model suitability, or support in every tree release.

Evidence

Event checked
Subject checked
Modified