alteryx / alteryx/evalml

Remove workarounds from Catboost incompatibility with string categories

Abierto
#4,051 3 comentarios 0 reacciones 1 asignado Reclamado por @chukarsten Ver en GitHub
Lenguaje dominante
Python
Estrellas
850
Forks
96
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.