Skip to main content
. 2023 Jul 27;25(8):1130. doi: 10.3390/e25081130
Algorithm 1:  Monte Carlo AMM [32]
Require:  A∈Rm×k and B∈Rk×n, and c∈N
Ensure: Z∈Rm×n such that ∥AB−Z∥ is small
  1:   Z←O
  2:  Set p1,…,pk such that ∑l=1kpl=1
  3:  for t=1,…,c  do
  4:        Pick it with P[it=l]=pl
  5:        Z←Z+A(it)B(it)cpit
  6:  end for