unseen_values¶
Count the categorical values in the dataset that are absent from the training data.
These are the values the unknown_category
parameter acts on. A missing value is never unseen.
Method call format¶
Parameters¶
X¶
Description¶
Feature values data.
Possible types
- polars.DataFrame
- polars.LazyFrame
- numpy.ndarray of shape
(object_count, feature_count) - other array-like data of the same shape
Default value
Required parameter
sample_weight, exposure¶
Description¶
The weight and the exposure of each object. When either is given, the result has a mass
column. A string names a column of a polars X.
Possible types
- numpy.ndarray of shape
(object_count,) - polars.Series
- list
- string
Default value
None
Return value¶
A polars DataFrame with one row per (feature, value), sorted by feature (in input order) and
then by the number of objects, descending:
feature— The feature name.value— The unseen value, as the string t-boost matches on (a numeric category1is"1").rows— The number of objects with the value.mass— Their totalsample_weight * exposure(only when one of them is given).