-
Notifications
You must be signed in to change notification settings - Fork 4
Description
- Refactor
training.pyto useTableobjects. - Refactor
serving.pyto useTableobjects.- Support
Tableobjects for multi-row inputs. - Support
Tableobjects for single-row inputs. (Is this efficient?)
- Support
- Support sparse
categoricaldata inTableobjects. - Generalize
format.pyto optionally create sparsecategoricaldata. - Support sparse
categoricaldata in training. - Support sparse
categoricaldata in serving.
Why?
Categorical features with many categories are useful for modeling random effects, e.g. modeling the zip code of voters, or the clinician id of medical diagnoses.
Also, support for two feature types (initially two very similar feature types) will make it much easier to support a third type such as real/normal data in #22 .
How?
The main bottleneck in TreeCat is space and time used to process internal ragged data:
- categoricals are represented as one-hot vectors in a ragged array, hence take
O(#cats)space - these one-hot vectors are processed cell-by-cell in both training and serving
To reduce these costs, the internal format can split from one datatype (multinomial) to two datatypes (multinomial and categorical), where categorical data is restricted to zero or one observation. Some plumbing already exists to pass a feature_types vector to the trainer, and to represent internal data as a Table object with heterogeneous data.