baal
baal copied to clipboard
No Stochastic Bald string mapping?
https://github.com/ElementAI/baal/blob/d2a31ff5f22b0279b2374e957d92039dbbd34e88/baal/active/init.py#L32
Oh good point!
If you could make the PR that would be great, otherwise I'll have time over the weekend
Can get to this on Wednesday evening I reckon
What's the best API design for this? Should heuristics remain completely separate to strategies? Should the API operate at the strategy level, which is then a combination of a heuristic and a sampling technique from that?
Aim of the PR is to cleanly / consistently / simply expose GibbsSampling, PowerSampling and RankBasedSampling to the user. Should that be exposed as gibbs_bald, power_bald and rank_based_bald in init.py ?
heuristic: heuristics.AbstractHeuristic = {
"random": heuristics.Random,
"certainty": heuristics.Certainty,
"entropy": heuristics.Entropy,
"margin": heuristics.Margin,
"bald": heuristics.BALD,
"variance": heuristics.Variance,
"precomputed": heuristics.Precomputed,
"batch_bald": heuristics.BatchBALD,
"gibbs_bald": stochastics.GibbsSampling,
"power_bald": stochastics.PowerSampling,
"rank_based_bald": stochastics.RankBasedSampling
}[name](shuffle_prop=shuffle_prop, reduction=reduction, **kwargs)
return heuristic
EDIT: I suspect the above is v. much pseudocode. I just mean in terms of the end user experience, is this roughly what we're after?
Hmm good question.
I think for now we can keep Heuristic and Strategy together.
So yes something like "power_bald", "power_entropy" would make sense to me.