Arize AI
Search…
⌃K

Features (structured)

Inputs into your model for structured data types

Overview

Arize captures the feature schema as the first prediction is logged. If the features change over time, the feature schema will adjust to show the new schema.
Features are inputs to the model

Code Example

# Declare which columns are the feature columns
schema = Schema(
prediction_id_column_name="prediction_id",
...
feature_column_names=["MERCHANT_TYPE", "ENTRY_MODE", "STATE", "MEAN_AMOUNT", "STD_AMOUNT", "TX_AMOUNT"],
)
# Log the dataframe with the schema mapping
response = arize_client.log(
model_id="sample-model-1",
model_version= "v1",
model_type=ModelTypes.NUMERIC,
environment=Environments.PRODUCTION,
dataframe=test_dataframe,
schema=schema,
)

FAQ

  • Do I log my raw model inputs or human readable features?
The most common example is one-hot encoded features. Let's say one of the features of the model is STATE.
If you sent in the values as One-Hot Encoded, it would look like this
feature1 - is_CA
feature 2 - is_NY
feature 3 - is_GA
....
feature 50 - is_TX
While this is doable, having 50 monitors for each of the 50 one-hot encoded features is cumbersome. If you want to know if this feature is empty, you will get 50 monitors firing instead of just 1 monitor saying the feature STATE is empty.
Recommended: Send in the features before they are one-hot encoded.
Example: feature1 - STATE. There would be 50 possible feature values including CA, NY, GA ... etc.