connorlee77 / pytorch-mutual-information

Mutual Information in Pytorch
103 stars 10 forks source link

how is the calculation formula of the kernel_values obtained #2

Closed MengtingXu1203 closed 1 year ago

MengtingXu1203 commented 1 year ago

Hello, I would like to ask, when calculating the marginalPdf, how is the calculation formula of the kernel_values obtained, why the value of sigma is 2*0.4**2, is there any reference material?

connorlee77 commented 1 year ago

Ahh good catch, this seems like a repeated calculation as the $2 \sigma ^ 2$ operation is already being done in

kernel_values = torch.exp(-0.5*(residuals / self.sigma).pow(2))