75dff38e70ec291fbd60382174277fcadddfd285,reagent/ope/estimators/contextual_bandits_estimators.py,DoublyRobustEstimator,evaluate,#DoublyRobustEstimator#Any#,138

Before Change


    

    def evaluate(self, input: BanditsEstimatorInput, **kwargs) -> EstimatorResults:
        self.reset()
        for log in input.logs:
            log_reward = RunningAverage()
            tgt_reward = RunningAverage()
            gt_reward = RunningAverage()

After Change


            )
            tgt_avg.add((sample.log_reward - dm_action_reward) * weight + dm_reward)
            gt_avg.add(sample.ground_truth_reward)
        return EstimatorResult(
            log_avg.average, tgt_avg.average, gt_avg.average, tgt_avg.count
        )

    def __repr__(self):
        return (
            f"DoublyRobustEstimator(trainer({self._trainer.name})"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: facebookresearch/Horizon
Commit Name: 75dff38e70ec291fbd60382174277fcadddfd285
Time: 2020-06-10
Author: jialiu@fb.com
File Name: reagent/ope/estimators/contextual_bandits_estimators.py
Class Name: DoublyRobustEstimator
Method Name: evaluate


Project Name: facebookresearch/Horizon
Commit Name: 75dff38e70ec291fbd60382174277fcadddfd285
Time: 2020-06-10
Author: jialiu@fb.com
File Name: reagent/ope/estimators/contextual_bandits_estimators.py
Class Name: DMEstimator
Method Name: evaluate


Project Name: facebookresearch/Horizon
Commit Name: 75dff38e70ec291fbd60382174277fcadddfd285
Time: 2020-06-10
Author: jialiu@fb.com
File Name: reagent/ope/estimators/contextual_bandits_estimators.py
Class Name: IPSEstimator
Method Name: evaluate