Computations of gaussian probabilities with diagonal covariance.
- Author
- Jacques Duchateau
- Date
- 20 Jan 1994
The basic formula for all computations is:
S = PROD(sigmas)
lnprob = -0.5 ( ovlen*ln(2PI) + 2.0*ln|S|
+ SUM( [(data-mu)/sigma]^2 )
pvec[i] = exp(lnprob[i]) )
- Revision History:
- Jan 1994 - Jacques Duchateau
- created from g_prob()
- Apr 1994 - Jacques Duchateau
- added mg_log_prob()
- May 1994 - Jacques Duchateau
- only top_n densities calculated in mg_prob
- May 1994 - Jacques Duchateau
- removed mvg_eval()
- Aug 1994 - Jacques Duchateau
- changed code to use logsigprod
- Aug 1994 - Jacques Duchateau
- removed mg_log_prob()
- Aug 1994 - Jacques Duchateau
- adapted for selected_gauss vector
- Sep 1994 - Jacques Duchateau
- max of pvec set in first place
- Aug 1995 - Kris Demuynck
- max of pvec no longer set in first place as another flooring mechanism is used
- Aug 1995 - Jacques Duchateau
- moved mg_floor() from output_prob.c to here
- Aug 1995 - Jacques Duchateau
- splitted up mg_prob() in mg_prob() (only probability calculation) and mg_sort() (selecting the largest probabilities)
- Aug 1995 - Jacques Duchateau
- changes for new hmm structures
- Aug 2004 - Kris Demuynck
- made mg_sort() more efficient + other small changes