-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support h2o datatable and numpy types, including for categorical types #3386
Comments
@pseudotensor seems interesting, I will check it. |
@pseudotensor Is it https://github.com/h2oai/datatable ? LightGBM currently processes the float data stored in the continued array and pandas.Dataframe will be converted to np array before that. |
Yes, this is what is referred to at: https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.Dataset.html when saying "H2O DataTable's Frame" I believe. If you recall, there was a problem where datatable -> lightgbm caused problems since lightgbm treated it as a buffer type object, but I think you convert it to numpy or pandas inside now.
Yes, so if types can be persisted, that would save alot. |
Closed in favor of being in #2302. We decided to keep all feature requests in one place. Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature. |
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
The text was updated successfully, but these errors were encountered: