📄 relent.3
字号:
.\" Copyright (c) 1988 Entropic Speech, Inc. All rights reserved..\"@(#)relent.3 1.1 31 Aug 1989 ESI.TH REL_ENT 3\-ESPSsp 31 Aug 1989.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..if t .ds S \(*S.if n .ds S \fRSUM\fP.if t .ds f \fI.if n .ds f \fR.SH NAMErel_ent \- compute relative entropy of two probability distributions.SH SYNOPSIS.ft B.nfdoublerel_ent(q, p, n) double *q, *p; int n;.SH DESCRIPTION.PPGiven two probability distributions.I pand.I q,this function returns the.I relative entropy.IP\*f\*S\d\s-3j\s+3\u q\d\s-3j\s+3\u \fRlog\fP q\d\s-3j\s+3\u/p\d\s-3j\s+3\u\fR.LPof.I qwith respect to.I p.Terms of the form 0 log 0 or 0 log 0/0 in this formula are taken to be 0 byconvention..PPThe arguments.I qand.I pshould each be an array of.I nnonnegative numbers that sum to 1.The argument.I ngives the array lengths..SH DIAGNOSTICSThe function does no error checking.If.I por .I qis not a probability distribution \- that is,if it has a negative element or if the sum of its elements is not 1,.I rel_entsimply applies the formula.A floating exception will occur if.IR log (3M)is given a negative argument,or if there is an index.I jfor which\*fp\d\s-3j\s+3\u\fRis 0 but\*fq\d\s-3j\s+3\u\fRis not..SH SEE ALSOmin_rel_ent(3-ESPSsp).AUTHORRodney W. Johnson, ESI
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -