baal icon indicating copy to clipboard operation
baal copied to clipboard

No Stochastic Bald string mapping?

Open GeorgePearse opened this issue 3 years ago • 4 comments

https://github.com/ElementAI/baal/blob/d2a31ff5f22b0279b2374e957d92039dbbd34e88/baal/active/init.py#L32

GeorgePearse avatar May 10 '22 20:05 GeorgePearse

Oh good point!

If you could make the PR that would be great, otherwise I'll have time over the weekend

Dref360 avatar May 10 '22 21:05 Dref360

Can get to this on Wednesday evening I reckon

GeorgePearse avatar May 23 '22 07:05 GeorgePearse

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?

GeorgePearse avatar Jun 05 '22 11:06 GeorgePearse

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.

Dref360 avatar Jun 10 '22 18:06 Dref360