tyxe/likelihoods.py
def aggregate_predictions(self, predictions, dim=0):
        """Aggregates multiple predictions for the same data by averaging them according to their predicted noise.
        Means with lower predicted noise are given higher weight in the average. Predictive variance is the variance
        of the means plus the average predicted variance."""
        loc, scale = self._predictive_loc_scale(predictions)
        precision = scale.pow(-2)
        total_precision = precision.sum(dim)
        agg_loc = loc.mul(precision).sum(dim).div(total_precision)
        agg_scale = precision.reciprocal().mean(dim).add(loc.var(dim)).sqrt()
        if not self.positive_scale:
            agg_scale = inverse_softplus(agg_scale)
        return torch.cat([agg_loc, agg_scale], -1)
Aggregates multiple predictions for the same data by averaging them according to their predicted noise.
        Means with lower predicted noise are given higher weight in the average. Predictive variance is the variance
        of the means plus the average predicted variance.
Aggregates multiple predictions for the same data by averaging them according to their predicted noise.
Means with lower predicted noise are given higher weight in the average. Predictive variance is the variance
of the means plus the average predicted variance.
Aggregates multiple predictions for the same data by averaging them according to their predicted noise . Means with lower predicted noise are given higher weight in the average . Predictive variance is the variance of the means plus the average predicted variance .
def aggregate_predictions(self, predictions, dim=0):
        loc, scale = self._predictive_loc_scale(predictions)
        precision = scale.pow(-2)
        total_precision = precision.sum(dim)
        agg_loc = loc.mul(precision).sum(dim).div(total_precision)
        agg_scale = precision.reciprocal().mean(dim).add(loc.var(dim)).sqrt()
        if not self.positive_scale:
            agg_scale = inverse_softplus(agg_scale)
        return torch.cat([agg_loc, agg_scale], -1)
def aggregate_predictions ( self , predictions , dim = 0 ) : loc , scale = self . _predictive_loc_scale ( predictions ) precision = scale . pow ( - 2 ) total_precision = precision . sum ( dim ) agg_loc = loc . mul ( precision ) . sum ( dim ) . div ( total_precision ) agg_scale = precision . reciprocal ( ) . mean ( dim ) . add ( loc . var ( dim ) ) . sqrt ( ) if not self . positive_scale : agg_scale = inverse_softplus ( agg_scale ) return torch . cat ( [ agg_loc , agg_scale ] , - 1 )
Aggregates multiple predictions for the same data by averaging them according to their predicted noise.
Aggregates multiple predictions for the same data by averaging them according to their predicted noise .
"""Aggregates multiple predictions for the same data by averaging them according to their predicted noise.
        Means with lower predicted noise are given higher weight in the average. Predictive variance is the variance
        of the means plus the average predicted variance."""
self
predictions
dim