Open MargaretDuff opened 2 weeks ago
Discussed with @bosschmidt at the CIL user meeting hackathon.
For the weighted L2 norm in CIL, the weight value can be a scalar or can be a CIL data container : https://github.com/TomographicImaging/CIL/blob/5d569dc054759a8c137ca72611fc7be07be6080e/Wrappers/Python/cil/optimisation/functions/L2NormSquared.py#L125 Mathematically, $F(x) = |x|_{W,2}^2 = \Sigma_iw_ix_i^2 = \langle x, Wx\rangle = x^TWx$ where $W=\text{diag}(weight)$ if weight is a DataContainer or $W=\text{weight} I$ if weight is a scalar.
weight
DataContainer
It might be useful to extend this so that $W$ is a linear operator whose range and domain are the same and contain the input $x$.
This would allow the weighted L2norm to be weighted by non-diagonal matrices.
Description
Discussed with @bosschmidt at the CIL user meeting hackathon.
For the weighted L2 norm in CIL, the weight value can be a scalar or can be a CIL data container : https://github.com/TomographicImaging/CIL/blob/5d569dc054759a8c137ca72611fc7be07be6080e/Wrappers/Python/cil/optimisation/functions/L2NormSquared.py#L125 Mathematically, $F(x) = |x|_{W,2}^2 = \Sigma_iw_ix_i^2 = \langle x, Wx\rangle = x^TWx$ where $W=\text{diag}(weight)$ if
weight
is aDataContainer
or $W=\text{weight} I$ ifweight
is a scalar.It might be useful to extend this so that $W$ is a linear operator whose range and domain are the same and contain the input $x$.
This would allow the weighted L2norm to be weighted by non-diagonal matrices.