alteryx / alteryx/evalml

Remove workarounds from Catboost incompatibility with string categories

Aperta
#4,051 3 commenti 0 reazioni 1 assegnatario Rivendicata da @chukarsten Vedi su GitHub
Lingua principale
Python
Stelle
850
Fork
96
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.