seldonian.parse_tree.zhat_funcs.vector_WIS_estimate¶
- vector_WIS_estimate(model, theta, episodes, weighted_returns, **kwargs)¶
Calculate weighted 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 WIS estimates calculated for each episode, such that the mean of this vector will be the WIS estimate.
- Return type:
numpy ndarray(float)