Pular para o conteúdo
AvraAvra
Esc
↑↓navegar↵abrir⌘Jpré-visualizar
Nesta página

How predictions work

What Avra RFM reads for each prediction — the record's related rows and labelled examples from your history — and how time keeps the future out of view.

Avra RFM predicts in context. For each prediction, it reads two things from your data as they stood on the prediction date: the rows related to the record it’s scoring, and labelled examples from your own history, records like it and what happened to them. Then it returns a score. Nothing is trained in between, and the model’s weights don’t change.

What the model reads

The record and its related rowsC1A1A2P1P2P3recorded laterLabelled examples from earlier datesC7 · Jul 1churnedC3 · Jul 15stayedC9 · Aug 1stayedAvra RFMscore
What the model reads for one prediction: the record’s related rows as of the prediction date, and labelled examples of the same question from earlier dates. A row recorded after the prediction date stays out of view.

The model starts from the record being scored and follows its keys across your tables: the customer’s accounts, their payments, the products on its orders, the company that owns it, and rows further out. It reads them as they were on the prediction date, so a row recorded after that date stays out of view, even if it’s in your database today. See Relational data for how keys and time shape what it can reach.

Labelled examples

The model also reads examples of the same prediction at earlier dates: other records, the rows around them, and the outcome that followed. That’s how it learns your question in context, what your outcome looks like in your data, without a training project. Examples come from the same population the prediction scores, so a prediction limited to active merchants learns from active merchants.

In context, not trained

Because the examples are read when the prediction is made, a new question needs no training run: frame it, evaluate it on your history, and put the scores to work. The model’s weights stay the same, and nothing about your business enters the shared model.

When an evaluation shows it’s worth it, a copy of the model can learn from your data instead: adapted to your database, or fine-tuned on one task. The copy is exclusive to your workspace. See Adaptation and fine-tuning.

Time and leakage

Leakage happens when information from after a decision sneaks into the prediction. One rule prevents it: a prediction for a given date sees a row only if the row was known by that date, and a labelled example only once its outcome’s window had closed by that date.

prediction date: Sep 10Jul 1 → Jul 29Jul 15 → Aug 12Aug 1 → Aug 29Aug 15 → Sep 12Sep 1 → Sep 29Jul 1Aug 1Sep 1closed by the prediction date: shown as an examplestill open on the prediction date: never shown
Which past outcomes a prediction dated September 10 can learn from, for a 28-day outcome. Outcomes whose window closed by September 10 are shown as examples; the two still open on that date are never shown.

Take a 28-day outcome. The outcome for a prediction dated August 1 was known on August 29, so a prediction for September 10 can learn from it. The outcome for August 15 isn’t known until September 12, so on September 10 it doesn’t exist yet, and it’s never shown, even though your database holds it today.

A few more rules hold for every prediction. A row with no time, in a static table, is visible on every date, so static tables should hold only values that don’t change. The outcome being predicted is never shown to the model, and neither is any other record’s outcome from the same date. Each table declares how its time is read; see What a table’s time means.

Backtests replay the same rules, so a result on your history is the result you would have seen at the time. See Evaluation.

What comes back

For a yes-or-no outcome, the RFM returns a score for each record; for a number, an estimate of the value. Each model version’s schema lists exactly what it returns.

Getting predictions

Score one record at a time through the API with live predictions when a decision comes up, or a whole portfolio on your schedule with batch inference. In your AWS account, predictions run as inference jobs on Amazon SageMaker. See Avra RFM on AWS SageMaker.

Esta página foi útil?