Quickstart (Local)
You can follow the instructions below to install Featureform locally and try out the dashboard.
You can also try local mode in this example 📔 Google Colab notebook 📔 here.
Step 1: Install Featureform
Requirements
- Python 3.7+
Install the Featureform SDK via Pip.
Step 2: Download test data
For this quickstart, we’ll use a fraudulent transaction dataset that can be found here: https://featureform-demo-files.s3.amazonaws.com/transactions.csvThe data contains 9 columns, almost all of which would require some feature engineering before being used in a typical model.
Step 3: Register files
We can write a config file in Python that registers our test data file.
Next, we’ll define a Dataframe transformation on our dataset.
Next, we’ll register a user entity to associate with a feature and label.
The ff.entity
decorator will use the lowercased class name as the entity name. The class attributes avg_transactions
and fraudulent
will be registered as a feature and label, respectively, associated with the user
entity. Indexing into the sources (e.g. average_user_transaction
) with a [["<ENTITY COLUMN>", "<FEATURE/LABEL COLUMN>"]]
, returns the required parameters to the Feature
and Label
registration classes.
When registering more than one variant, we can use the Variants
registration class:
Finally, we’ll join together the feature and label into a training set.
Now that our definitions are complete, we can apply them to our Featureform instance.
Step 4: Serve features for training and inference
Once we have our training set and features registered, we can train our model.
We can serve features in production once we deploy our trained model as well.