powered by
Penalizes numerical issues in \(W\): (i) deviation of each row sum from 1, measured by the mean absolute deviation, and (ii) count of negative entries. The score is \(\exp(-(a\,\mathrm{msd} + b\,\#\mathrm{neg}))\).
numerical_stability_exp(W, a = 1000, b = 10)
Scalar numerical stability score in \([0,1]\).
Posterior matrix (\(T \times K\)).
Sensitivity for row-sum deviation (default 1000).
1000
Sensitivity for negative counts (default 10).
10
W <- matrix(runif(20), 5); W <- W/rowSums(W) numerical_stability_exp(W)
Run the code above in your browser using DataLab