← Back to Dictionary

Feature View

What is a feature view?

A feature view is a selection of features (and labels) from one or more feature groups. You create a feature view by joining together features from existing feature groups and optionally performing following steps: defining one or more of the selected features as labels, declaring a transformation (feature encoding) for one or more selected features, and returning only certain feature values by applying a user-supplied filter condition.  

feature view

As a feature view can include model-dependent transformation functions for features, it can be said to be aware of each feature’s feature type. The feature view also knows about the entity_id (primary key) and event_time columns for each feature in the feature view.  

feature group example

Why are feature views important?

The feature view is a representation of the features (and labels) used by one or more models. As such, it is a model-specific view of features/labels in the feature store. The feature view: 

  • provides a unified interface for features used by a model for training and inference;
  • prevents data leakage when training data by creating point-in-time consistent snapshots;
  • prevents training/inference skew for model-dependent transformations by providing declarative support for specifying transformations, and executing model-dependent transformations when reading feature data for training and inference;
  • supports filters when creating training data and batch inference data, enabling support specialized models that share the same set of features. For example, if you want to train a model for users in different regions (e.g., USA, Europe, Asia), you can create training data with a filter for the geographic region, returning only training data for users in that geographic region.   

Example of a feature view

Suppose you have two feature groups for an e-commerce platform: customer_information and purchase_history. You want to create a feature view for predicting customer churn that combines relevant features from both feature groups.