alteryx / alteryx/evalml

Remove workarounds from Catboost incompatibility with string categories

Offen
#4,051 3 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @chukarsten Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
850
Forks
96
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Catboost currently has an incompatibility with columns that have the `category` dtype and `string` categories https://github.com/catboost/catboost/issues/1965. Because of this, we have two workarounds in place that we should remove whenever this issue is resolved.

1. In the imputer refactor for handling nullable types, we stopped being able to recognize boolean categorical columns, which allowed us to use the logical types from the Email and URL primitives. This surfaced the catboost incompatibility at `_ExtractFeaturesWithTransformPrimitives`, so we convert to `object` dtype ([here](https://github.com/alteryx/evalml/blob/main/evalml/pipelines/components/transformers/preprocessing/transform_primitive_components.py#L81)) and reinitialize woodwork to change the string categories produced by the primitives to `object` categories that catboost can handle.
2. In the Catboost estimators, we have to handle float categories as part of a different catboost requirement. We currently handle this in a [clunky way](https://github.com/alteryx/evalml/blob/imputer-refactor/evalml/pipelines/components/utils.py#L468-L472), but converting the categories to string would likely be a much simpler solution. We should also use `apply` to do that change as noted in https://github.com/alteryx/evalml/issues/3973, which will also be a nicer way to do this.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.