Skip to main content

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

https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/gc.ico

Google Colab

Example Row

price (float)pos_approved (bool)zip_codeageprediction_scoreactual_scoreprediction_ts
88.5False1234525100901671572541
# 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
)

Quick Definitions

Prediction Label: The numeric value of the prediction (float | int) Actual Label: The numeric value of the actual (float | int)