fouticus / nsfbm

Non-Uniform Sampling of Fixed Binary Matrices
GNU General Public License v3.0
2 stars 0 forks source link

definition of the observed matrix A^{(0)} #5

Open michalkvasnicka opened 4 years ago

michalkvasnicka commented 4 years ago

In a case of sampling matrices A^{(k)} should be the good option to generate A^{(0)} automatically if is not defined.

fouticus commented 4 years ago

Thanks for the suggestion. I'm not aware of an efficient way to determine if such an A0 is possible, let alone find one, in the presence of structural zeros. This would be an interesting research direction.

michalkvasnicka commented 4 years ago

Again, in a case of permutation matrices A, the effective way how to generate any "first" permutation matrix A0 which is consistent with weight matrix W (with structural zeros) is application of Hungarian algorithm (linear assignment problem) to find most (maximization) or less (minimization) probable permutation. You just need to transform matrix W to matrix log(W) matrix to change from multiplication of probabilities to addition of logarithms of probabilities.