seldonian.parse_tree.zhat_funcs.vector_IS_estimate

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

Calculate the unweighted 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 IS estimates calculated for each episode

Return type:

numpy ndarray(float)