Regression Model Overview
Regression models have a continuous, numeric output. (Examples: click-through rates, sales forecasting, customer lifetime value, ETA models, etc.)
Performance Metrics
MAPE, MAE, RMSE, MSE, R-Squared, Mean Error
Allowed Metric Families: Regression
Click here for all valid model types and metric combinations.
Regression Code Example
Example Row
price (float)
pos_approved (bool)
zip_code
age
prediction_score
actual_score
prediction_ts
# feature & tag columns can be optionally defined with typing:
tag_columns = TypedColumns(
inferred=["name"],
to_int=["zip_code", "age"]
)
# Declare the schema of the dataframe you're sending (feature columns, predictions, timestamp, actuals)
schema = Schema(
prediction_id_column_name="prediction_id",
timestamp_column_name="prediction_ts",
prediction_score_column_name="prediction_score",
actual_score_column_name="actual_score",
feature_column_names=["price", "pos_approved"],
tag_column_names=tag_columns,
)
# Log the dataframe with the schema mapping
response = client.log(
model_id='sample-model-1',
model_version='v1',
model_type=ModelTypes.REGRESSION,
metrics_validation=[Metrics.REGRESSION],
environment=Environments.PRODUCTION,
dataframe=test_dataframe,
schema=schema
)
# features & tags can be optionally defined with typing
features = {
'score': '88.5',
'pos_approved': TypedValue(value=False, type=ArizeTypes.INT)
}
tags = {
'zip_code': '12345'
'age': '25'
}
response = client.log(
model_id='sample-model-1',
model_version='v1',
model_type=ModelTypes.REGRESSION,
environment=Environments.PRODUCTION,
features = features,
tags=tags
prediction_label=100,
actual_label=90
)
Download an example Parquet file:
Open parquet reader here.
Download an example CSV file:
Learn how to upload files via various Data Connectors:
Quick Definitions
Prediction Label: The numeric value of the prediction (float | int)
Actual Label: The numeric value of the actual (float | int)