alteryx / alteryx/evalml

LogTransformer can raise `TypeValidationError` if integer nullable y is passed in

Abierto
#3,976 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
850
Forks
96
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```python
import woodwork as ww
X = pd.DataFrame({
"nullable bool col": [True, False, False, True, True] * 4,
"nullable int col": [0, 1, 2, 0, 3] * 4,
})
X.ww.init()
y = pd.Series([1, 3]*(len(X)//2))
y = ww.init_series(y, logical_type="IntegerNullable")
comp = LogTransformer()
comp.fit(X, y)
comp.transform(X, y)

```
Note - this doesn't happen if the data is `[0, 1]` instead of `[0,3]`, and I'm not sure why, but I wonder if it is somehow related to booleans?

This can be fixed by replacing [this line](https://github.com/alteryx/evalml/blob/main/evalml/pipelines/components/transformers/preprocessing/log_transformer.py#L52) with a call to `ww.init_series`.

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.