microsoft / mwt-ds

Umbrella repository for projects related to the MWT Decision Service
187 stars 77 forks source link

Probabilities sometimes slightly higher than 1 in Local mode #88

Open ukaratay opened 7 years ago

ukaratay commented 7 years ago

This line causes the problem. I currently solved it by clipping the probability.

var prob = ((GenericTopSlotExplorerState)dp.InteractData.ExplorerState).Probabilities[action - 1]; var label = new ContextualBanditLabel(action, -dp.Reward, (prob < 1) ? 1 : ((prob > 0) ? 0 : prob));