alteryx / alteryx/evalml

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

Offen
#3,976 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
850
Forks
96
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

```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`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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