Skip to content

Support Conversion of Distribution Types #101

@akleeman

Description

@akleeman

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions