alteryx / alteryx/evalml

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

Đang mở
#3,976 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
850
Fork
96
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.