seldonian.models.objectives.WIS_estimate

WIS_estimate(model, theta, episodes, **kwargs)

Calculate the weighted importance sampling (WIS) estimate using all episodes. This is: sum(i=0 to n) { rho_i/rhosum} * G_i, where rhosum is sum(j=0 to n) {rho_j} and G_i is the discounted expected primary return.

Parameters:
  • model – SeldonianModel instance

  • theta (numpy ndarray) – The parameter weights

  • episodes – List of episodes

Returns:

The WIS estimate

Return type:

float