Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Stochastic Bald string mapping? #210

Open
GeorgePearse opened this issue May 10, 2022 · 4 comments
Open

No Stochastic Bald string mapping? #210

GeorgePearse opened this issue May 10, 2022 · 4 comments

Comments

@GeorgePearse
Copy link
Collaborator

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

@Dref360
Copy link
Member

Dref360 commented May 10, 2022

Oh good point!

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

@GeorgePearse
Copy link
Collaborator Author

Can get to this on Wednesday evening I reckon

@GeorgePearse
Copy link
Collaborator Author

GeorgePearse commented Jun 5, 2022

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?

@Dref360
Copy link
Member

Dref360 commented Jun 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants