Evaluation
KumoRFM provides an evaluation mode that automatically measures prediction quality by performing a train/test split on context examples and computing relevant metrics.
Running an Evaluation
Use KumoRFM.evaluate() with the same PQL syntax as `KumoRFM.predict()`:
The evaluation collects context examples, splits them into in-context (training) and test sets, generates predictions for the test set, and computes metrics comparing predictions to actual outcomes.
You can also use the EVALUATE keyword in the query string directly:
Available Metrics
The metrics returned depend on the detected task type:
You can specify which metrics to compute:
Evaluation Parameters
The KumoRFM.evaluate() method accepts the same parameters as KumoRFM.predict(), plus:
metrics: A list of metric names to compute. If not specified, all applicable metrics for the task type are computed.
The run_mode, anchor_time, num_hops, and other parameters work identically to KumoRFM.predict(). See configuration for details on run modes.
Evaluation with TaskTable
For advanced use cases, you can construct a TaskTable explicitly and use `KumoRFM.evaluate_task()`:
This gives you full control over the train/test split and context construction.
Interpreting Results
The evaluation returns a pandas.DataFrame with metric and value columns:
Higher values are better for r2, acc, auroc, auprc, ap, precision, recall, and f1. Lower values are better for mae, mape, mse, rmse, smape.