airlab-unibas / airlab

Image registration laboratory for 2D and 3D image data
Apache License 2.0
408 stars 92 forks source link

Mutual inforamtion loss normaliser 1d & 2d redundant? #32

Open qiuhuaqi opened 4 years ago

qiuhuaqi commented 4 years ago

This step computing the joint distribution in MI pairwise loss: https://github.com/airlab-unibas/airlab/blob/80c9d487c012892c395d63c6d937a67303c321d1/airlab/loss/pairwise.py#L381

The marginal distributions are already normalised by self._normalizer_1d in: https://github.com/airlab-unibas/airlab/blob/80c9d487c012892c395d63c6d937a67303c321d1/airlab/loss/pairwise.py#L339

I might be mistaken. But doesn't the joint distribution no longer need normalisation (self._normalizer_2d) as its the outer product of the normalised marginal distributions?