Skip to content

Support h2o datatable and numpy types, including for categorical types #3386

Closed
@pseudotensor

Description

https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.Dataset.html

Currently lightgbm consumes a dataframe that is converted to 32-bit or 64-bit floats internally. These values are then binned, but not before having exposed the full data frame as full float values.

h2o-3 and other packages are "lighter" in that they chunk the data further into 1, 2, 4, byte objects. E.g. bools and some floats that only manifest certain number of digits (e.g. 1.1, 1.2, 1.3, 1.4, etc.) take up 4 bytes at least, even if only could have taken 1 byte. A categorical type might have only 10 levels, but still consume a 32-bit object.

Summary

Allow passing data frames with data types less than 32-bit and consume these directly during binning and any categorical handling. Example datasets like Bosch from Kaggle use only 2GB of memory in h2o-3, while consume far more once having to pass a pandas or h2o datatable frame (with more limited types) into lightgbm.

Motivation

Vastly superior memory handling for realistic datasets.

Description

See chunk compression summary at https://www.h2o.ai/wp-content/uploads/2018/01/Python-BOOKLET.pdf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions