optpolicy_main.OptimalPolicy.evaluate_multiple#
- OptimalPolicy.evaluate_multiple(allocations_dic, data_df)#
Evaluate several allocations simultaneously and write comparison output.
Requires ‘_int_with_output’ to be True. Otherwise, raises ValueError before evaluation.
Run
solve()orsolvefair()on this instance first. With ‘gen_method’ == ‘best_policy_score’,allocate()also initializes the instance for evaluation.- Parameters:
allocations_dic (Dictionary) – Maps allocation names (strings) to one-column DataFrames or Series of treatment codes. Each value describes one allocation and must contain one entry per row of
data_df. Codes must be finite integers from 0 to K - 1, in the order of'var_polscore_name', where K is the number of treatments.data_df (DataFrame) – Policy-score data for evaluating the allocations. Every allocation must have the same row order as this DataFrame; rows are matched by position, without index alignment. Requires a complete treatment block of policy scores. Selection follows evaluate(): use current scores, or the descriptive-score fallback after fairness or estimation-risk adjustment. If neither is available, this method raises ValueError.
- Returns:
results_dic – Contains the results. This dictionary has the following structure: ‘outpath’ : Path
Location of directory in which output is saved.
- Return type:
Dictionary.