mbi.marginal_loss.from_linear_measurements
- mbi.marginal_loss.from_linear_measurements(measurements: list[LinearMeasurement], norm: str = 'l2', normalize: bool = False, domain: Domain | None = None) MarginalLossFn[source]
Construct a MarginalLossFn from a list of LinearMeasurements.
- Parameters:
measurements – A list of LinearMeasurements.
norm – Either “l1” or “l2”.
normalize – Flag determining if the loss function should be normalized by the length of linear measurements and estimated total.
domain – The domain over which the measurements were made, necessary for calcualting the Lipschitz parameter.
- Returns:
The MarginalLossFn L(mu) = sum_{c} || Q_c mu_c - y_c || (possibly squared or normalized).