featurebyte.FeatureGroup.preview¶
preview(
observation_set: DataFrame
) -> Union[DataFrame, NoneType]Description¶
Materializes a FeatureGroup object using a small observation set of up to 50 rows. Unlike compute_historical_features, this method does not store partial aggregations (tiles) to speed up future computation. Instead, it computes the features on the fly, and should be used only for small observation sets for debugging or prototyping unsaved features.
The small observation set should combine historical points-in-time and key values of the primary entity from the feature group. Associated serving entities can also be utilized.
Parameters¶
- observation_set: DataFrame
Observation set DataFrame which combines historical points-in-time and values of the feature primary entity or its descendant (serving entities). The column containing the point-in-time values should be namedPOINT_IN_TIME
, while the columns representing entity values should be named using accepted serving names for the entity.
Returns¶
- Union[DataFrame, NoneType]
Materialized feature values. The returned DataFrame will have the same number of rows, and include all columns from the observation set.
Note: POINT_IN_TIME
values will be converted to UTC time.
Raises¶
- RecordRetrievalException
Preview request failed
Examples¶
Create a feature group with two features.
>>> features = fb.FeatureGroup([
... catalog.get_feature("InvoiceCount_60days"),
... catalog.get_feature("InvoiceAmountAvg_60days"),
... ])
See Also¶
- Feature.preview: Preview feature group.
- FeatureList.compute_historical_features: Get historical features from a feature list.