Skip to main content
Version: 3.2

Retrieving the Training data from Feature Store.

We can use the Offline Store to create a training dataset & train the models with it.

Let's create a Training Dataset.

  • To keep the consistency between Training & Testing Datasets. We will use a entity datafram which consists of id & event timestamp column.
  • By using these entity dataframe, feature store will find the historical records by doing point-in-time joins.
python
# Let's load the Entity Dataframe.

entity_df = pd.read_csv("entity_df.csv")

Make sure that this dataset's data types are also Accurate. please make sure of that.

Retrieving Historical Features.

python
# Now let's use this entity df to create a training dataset with the historical features.

train_data = fs.get_historical_features(
entity_df = entity_df, # Your Entity Dataframe
feature_view = ["default_loan_feature_view"], # The name that you gave to create your feature view.
features = cols, # The features that we want to retrieve from offline store.
).to_df() # We are directly converting it to a pandas Dataframe.

We can use this train data to build the models.