seldonian.parse_tree.zhat_funcs.vector_PDIS_estimate

vector_PDIS_estimate(model, theta, episodes, weighted_returns, **kwargs)

Calculate per decision importance sampling estimate on each episodes in the dataframe

Parameters:
  • model – SeldonianModel instance

  • theta (numpy ndarray) – The model weights

  • episodes – List of episodes

  • weighted_returns – A pre-calculated list of weighted returns from the reward that is present in the constraint

Returns:

A vector of PDIS estimates calculated for each episode

Return type:

numpy ndarray(float)