h2oai / datatable

A Python package for manipulating 2-dimensional tabular data structures
https://datatable.readthedocs.io
Mozilla Public License 2.0
1.81k stars 155 forks source link

`LinearModel` error when detecting target column types for early stopping #3466

Closed oleksiyskononenko closed 1 year ago

oleksiyskononenko commented 1 year ago

The perfectly valid LinearModel fit call

from datatable import dt
from datatable.models import LinearModel

DT_X = dt.Frame([1, 2, 3])
DT_y = dt.Frame([True, False, True])

lm = LinearModel()
lm.fit(DT_X, DT_y, DT_X, DT_y)

errors with

TypeError: Training and validation target columns must have the same ltype, got: int and bool

The issue here is that the model didn't properly read the training target column type.