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

Support Conversion of Distribution Types #101

Open
akleeman opened this issue Mar 28, 2019 · 0 comments
Open

Support Conversion of Distribution Types #101

akleeman opened this issue Mar 28, 2019 · 0 comments

Comments

@akleeman
Copy link
Collaborator

It's often the case that we precompute a bunch of Distributions, but then need some subset of that for use as a function argument. For example we might have:

EvaluationMetric<MarginalDistribution> metric;
std::vector<RegressionDataset<X>> folds;
std::map<std::string, JointDistribution> predictions;

and we'd want to call cross_validated_scores(metric, folds, predictions), but since the metric takes a MarginalDistribution and our predictions are JointDistributions things don't work out gracefully.

The current approach is to specialize each function that needs to do this sort of conversion (see cross_validated_scores), but ideally we'd be able to set up a set of conversion methods that would let us do:

JointDistribution joint;
MarginalDistribution x = joint;
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

1 participant