Maxia's Prediction Platform can send predictions into Segment using the official Spec. Our implementation is built using the official Segment Python library. Maxia Predictions are sent as traits about your groups and users. We provide the following data:

Prediction Probability (required):

a trait with name {MODEL_NAME}_prediction_probability and a floating point value that is the output of your Maxia model

Prediction Date (required):

a trait with name {MODEL_NAME}_prediction_date and a Date string value that identifies the date the prediction was made for. Maxia models are time series models with daily resolution, and this value helps you keep track of how recent your prediction is.

Maxia Timestamp (optional):

a trait with name {MODEL_NAME}_maxia_ts and a Date and Time string value that is the timestamp for when the prediction was generated

Observed Timestamp (optional):

a trait with name {MODEL_NAME}_observed_ts and a Date and Time string value that is the timestamp for when the group or user was last observed in the Segment data

Date and Time string values are sent in ISO-8601 format and in UTC with microsecond precision by default.

Group Predictions

Maxia can send predictions about groups into Segment. Predictions are sent in for a single user associated with the group, for every group associated with your Maxia model. Prediction data are sent in as group traits. If your model is named paid, then it would look like this:

analytics.group('user_id', 'group_id', {
  'paid_prediction_probability': 0.67 # floating point number
  'paid_observed_ts': "2020-12-09T00:07:02+00:00" # ISO-8601 Date and Time String  
  'paid_maxia_ts':  "2020-12-09T00:07:02+00:00" # ISO-8601 Date and Time String 
  'paid_prediction_date': "2020-12-09" # ISO-8601 Date String
})

User Predictions

Maxia can send predictions about users into Segment. Predictions are sent in for every user associated with your Maxia model. Prediction data is sent in as user traits. If your model is named paid, then it would look like this: