Skip to content

Commit

Permalink
Merge pull request #136 from Dhanunjaya-Elluri/mgd
Browse files Browse the repository at this point in the history
Added Mean Gamma Deviance Formula
  • Loading branch information
santiviquez authored Dec 1, 2024
2 parents 2460c41 + dcacd3d commit a55cb0a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions book/2-regression.tex
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,22 @@ \subsection{Mean Gamma Deviance}

% formula
\begin{center}
[FORMULA GOES HERE]
\tikz{
\node[inner sep=2pt, font=\Large] (a) {
{
$\displaystyle
MGD = \frac{1}{{\color{nmlred}n}} \sum_{i=0}^{{n-1}} 2 \left( {\color{nmlcyan}y_i} log\left(\frac{\color{nmlcyan}y_i}{\color{nmlpurple}\hat{y}_i}\right) - ({\color{nmlcyan}y_i} - {\color{nmlpurple}\hat{y}_i}) \right)
$
}
};

\draw[-latex,nmlred, semithick] ($(a.south)+(-2.5,0.2)$) to[bend left=15] node[pos=1, left] {number of samples} +(-1,-.5);
\draw[-latex, nmlcyan, semithick] ($(a.north)+(1.2,-0.2)$) to[bend left=15] node[pos=1, right] {actual value} +(1,.5);
\draw[-latex, nmlpurple, semithick] ($(a.south)+(1.2,0.2)$) to[bend right=15] node[pos=1, right] {predicted value} +(1,-.5);
}
\end{center}

MPD ranges from 0 to +infinity, with 0 indicating a perfect model fit for count data.
MGD ranges from 0 to +infinity, with 0 indicating a perfect model fit for count data.

\textbf{When to use MGD?}

Expand Down

0 comments on commit a55cb0a

Please sign in to comment.