pytyche.analysis.TruthComparison¶
- class pytyche.analysis.TruthComparison(cate_rmse, policy_accuracy, rpv_policy, rpv_uniform, rpv_oracle, oracle_gap_rpv)[source]¶
Bases:
objectSim-mode evaluation metrics. Tight — no optional fields.
Produced by
posterior.evaluate_against_truth(tree, truth).Level: experiment (simulation only).
- cate_rmse¶
RMSE of the posterior-mean contrasts against the truth contrasts, pooled over all
n × (K − 1)(visitor, contrast) entries.
- policy_accuracy¶
Fraction of visitors whose tree-assigned arm equals the truth best arm (the shared best-arm rule applied to the truth contrast vectors).
- rpv_policy¶
Realized revenue-per-visitor of the tree policy under the truth potential-outcome surfaces (
p_a · m_aper arm).
- rpv_uniform¶
Realized RPV of uniform random assignment.
- rpv_oracle¶
Realized RPV of the per-visitor best arm.
- oracle_gap_rpv¶
rpv_oracle − rpv_policy— how much the policy leaves on the table against a truth-knowing oracle.
- Parameters:
cate_rmse (
float)policy_accuracy (
float)rpv_policy (
float)rpv_uniform (
float)rpv_oracle (
float)oracle_gap_rpv (
float)
- __init__(cate_rmse, policy_accuracy, rpv_policy, rpv_uniform, rpv_oracle, oracle_gap_rpv)¶
- Parameters:
cate_rmse (
float)policy_accuracy (
float)rpv_policy (
float)rpv_uniform (
float)rpv_oracle (
float)oracle_gap_rpv (
float)
- Return type:
None
Methods
__init__(cate_rmse, policy_accuracy, ...)Attributes