pdstools.prediction.Schema

Schema definitions for Prediction Studio data.

Mirrors the layout of pdstools.adm.Schema — each class is a plain attribute container mapping column names to their target Polars dtypes. Used by pdstools.prediction.Prediction’s internal validators to coerce raw input into a consistent shape.

Classes

PredictionSnapshot

Raw column dtypes for the PR_DATA_DM_SNAPSHOTS Pega export.

PredictionData

Processed/output column dtypes for Prediction.predictions.

Module Contents

class PredictionSnapshot

Raw column dtypes for the PR_DATA_DM_SNAPSHOTS Pega export.

These are the columns produced by Pega’s Prediction Studio dataset export (or equivalent PDC payload) before any pdstools renaming or pivoting is applied.

pySnapShotTime
pyModelId
pyModelType
pySnapshotType
pyDataUsage
pyPositives
pyNegatives
pyCount
pyValue
pyName
class PredictionData

Processed/output column dtypes for Prediction.predictions.

The shape produced after Prediction’s validator pivots raw rows into per-(pyModelId, SnapshotTime) records with Test/Control/NBA suffixes.

pyModelId
SnapshotTime
Class
ModelName
Performance
Positives
Negatives
ResponseCount
Positives_Test
Positives_Control
Positives_NBA
Negatives_Test
Negatives_Control
Negatives_NBA
ResponseCount_Test
ResponseCount_Control
ResponseCount_NBA
CTR
CTR_Test
CTR_Control
CTR_NBA
CTR_Lift
isValidPrediction