CIL icon indicating copy to clipboard operation
CIL copied to clipboard

PowerMethod will produce slightly different results for every call

Open evelinaametova opened this issue 4 years ago • 3 comments

https://github.com/vais-ral/CCPi-Framework/blob/598f758d660e9da92878d6819502321cb7c2b09e/Wrappers/Python/cil/optimisation/operators/Operator.py#L134

Shouldn't this random allocation be seeded? If not seeded, reconstructions with exactly the same input will produce slightly different results.

evelinaametova avatar Mar 22 '21 08:03 evelinaametova

Yes, should be seeded for reproducibility.

On Mon, 22 Mar 2021 at 09:03, evelinaametova @.***> wrote:

Assigned #806 https://github.com/vais-ral/CCPi-Framework/issues/806 to @jakobsj https://github.com/jakobsj.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/vais-ral/CCPi-Framework/issues/806#event-4488498790, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMDSCHBBH7HSU3DYHSEHE3TE32VJANCNFSM4ZSTJEHA .

jakobsj avatar Mar 22 '21 08:03 jakobsj

Suggest to add a new self._random_number_seed member in LinearOperator that will be used by calculate_norm https://github.com/TomographicImaging/CIL/blob/3e29c5b512485e563935053b33b7dba5d9187690/Wrappers/Python/cil/optimisation/operators/Operator.py#L154-L167

to create x0 if no x_init is passed

paskino avatar Sep 20 '21 11:09 paskino

In https://github.com/TomographicImaging/CIL/pull/1645 we found that we needed a random seed for the power method tests! It would be good to be able to set the random seed in the argument of the power method

MargaretDuff avatar Feb 27 '24 10:02 MargaretDuff

We discussed on 6/2/25 that we could also implement the calculation of the norm of the operator with the Jacobi iterations as implemented by @evgueni-ovtchinnikov in SIRF. The method converges much quicker than the PowerMethod. Here how that is called.

paskino avatar Feb 06 '25 10:02 paskino