Skip to content

train_eval()

kpe.train_eval(X, A, Y, propensity, *, n_shuffles=100, n_folds=6, contextual_policy='policy_tree', best_arm='ips', reward_model='random_forest', policy_features=None, n_jobs=1, random_state=None, verbose=False)

Single-split AIPW baseline: a 50/50 split, repeated n_shuffles times.

Each shuffle trains the reward model, contextual policy, and best-arm learner on a random half of the rows and scores the AIPW influence function on the held-out half. n_folds is accepted for API symmetry with :func:kpe and is ignored.