arize.log() with a predicted label, predicted actual, their feature inputs, their shap values, and a corresponding prediction id. Once records are sent to Arize’s platform, you’ll be able to visualize and analyze data holistically or within aggregated slices.
arize.log() returns a Response. You can await on the Response to complete to ensure successful delivery of records.
When logging a prediction for the first time for a new model, we classify the model in the Arize platform based on the data type of the prediction.
For more information on model schema discovery, visit here:
What Is A Model Schema
API
API Arguments
| Argument | Type(s) | Description | Required |
| modelId | String | Costumer provided unique identifier for a given model. | Y |
| modelVersion | String | Used to group together a subset of predictions and actuals for a given model_id. If null is passes, a prediction will only be associated with a model id with no version. | Y |
| predictionId | String | Unique string identifier for specific label. Must match a previously sent Prediction record. | Y |
| features | Map<String, ?>Where value can be oneOf: String, int, long, short, double, float, boolean, List<String> | Map containing human readable and debuggable model features. Map keys must be String and values one of: String, int, long, short, double, float, boolean, List<String> | Optional |
| embeddingFeatures | Map<String, Embedding> | Map containing human readable and debuggable model embedding features. Map keys must be String and values Embedding | |
| tags | Map<String, ?> Where value can be oneOf: String, int, long, short, double, float, boolean, List<String> | Map containing human readable and debuggable model features. Map keys must be String and values one of: String, int, long, short, double, float, boolean, List<String> | Optional |
| predictionLabel | String, boolean, int, long, short, float, double | The predicted label for a given model input (associated via predictionId). | Optional |
| actualLabel | String, boolean, int, long, short, float, double | The actual label for a given model input (associated via predictionId) | Optional |
| shapValues | Map<String, Double> | Map keys must be String and match the names of the features used in the prediction; values must be Double. | Optional |
| predictionTimestamp | long | If long representing Unix epoch time in seconds, set overwrite the timestamp for prediction.If null, default to current timestamp.Important: Future and Historical predictions are supported up to 1 year from current wall clock time. | Optional |
Sample Code (Categorical)
Sample Code - Score Categorical
Sample Code - Sending in Numeric Sequences for Ranking Models
The following code snippet highlights the use of theScoredCategorical constructor for including a numeric sequence in the actualScoreLabel
Questions? Email us at support@arize.com or Slack us in the #arize-support channel