alteryx / alteryx/evalml

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

オープン
#3,976 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
850
フォーク
96
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。