Open gdalle opened 6 days ago
After reading the code more carefully, it seems that nondeterminism in your code is caused by the following two lines:
Creating an Array
using similar
reuses whatever was in those memory slots before, which can vary from one execution to the next. In this case it is problematic, because you use the columns of A
/ V
to initialize the optimization algorithm, so you may get different results in the end if the algorithm is local. In addition, this makes your functions _initialize_A
/ _initialize_V
useless.
Presumably what you want is to copy
the existing A
/ V
instead. I have done this in #23, but I still don't understand why you modify epca.V
in-place?
https://github.com/sisl/ExpFamilyPCA.jl/blob/cfcc98ab2bba394dbdfb44a174599de87012d0ad/src/epca.jl#L124
Hi! Could you please explain the following behavior? Why don't we get the same PCA in both consecutive runs of
fit!
? It seems the initial state ofpoisson_epca
matters?