Student Support Forum: 'mutual information of red andgreen channel of a...' topicStudent Support Forum > General > "mutual information of red andgreen channel of a..."

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response matt prior 09/21/07 10:09am Hi there I think you could adopt one of two approaches. The first and probably the most practical is to replace the histogram entries that are zero with the smallest machine precision number. So after you calculate the histograms but before you calculate the mutual information... do histRed = histRed /. 0 -> \$MachineEpsilon histGreen = histGreen /. 0 -> \$MachineEpsilon The other approach would be to split the calculation of the second part of the mutual information from:= Log[ P(x,y)/(p(x) p(y))] Into ... Log[p(x,y)] - Log[p(x) p(y)] This removes the division by zero ... but leaves you with an infinite probability .. which is theoretically correct but perhaps not that useful. Hope that helps, Matt URL: ,

 Subject (listing for 'mutual information of red andgreen channel of a...') Author Date Posted mutual information of red andgreen channel of a... Matther Fergie 09/17/07 5:16pm Re: mutual information of red andgreen channel ... yehuda ben-s... 09/18/07 2:08pm Re: mutual information of red andgreen channel ... matt prior 09/21/07 10:09am
 < Previous Comment Help | Reply To Comment | Reply To Topic