[Scipy-svn] r6556 - branches/0.8.x/scipy/stats

scipy-svn@scip... scipy-svn@scip...
Mon Jun 21 11:11:54 CDT 2010


Author: oliphant
Date: 2010-06-21 11:11:54 -0500 (Mon, 21 Jun 2010)
New Revision: 6556

Modified:
   branches/0.8.x/scipy/stats/distributions.py
Log:
Update nnlf method documentation in stats.

Modified: branches/0.8.x/scipy/stats/distributions.py
===================================================================
--- branches/0.8.x/scipy/stats/distributions.py	2010-06-21 16:02:08 UTC (rev 6555)
+++ branches/0.8.x/scipy/stats/distributions.py	2010-06-21 16:11:54 UTC (rev 6556)
@@ -1251,6 +1251,24 @@
         return -sum(log(self._pdf(x, *args)),axis=0)
 
     def nnlf(self, theta, x):
+        """Negative log likelihood function. 
+
+        This function should be minimized to produce maximum likelihood estimates (MLE).
+
+        Paramters
+        ---------
+        theta : array-like
+             Parameters that the log-likelihood function depends on (shape<s>, loc, scale)
+             where loc and scale are always the last two parameters.
+        x : array-like
+             The value of x to evaluate the log-likelihood function at (the observed data). 
+             
+        Returns
+        -------
+        nnlf : float
+             For an array of x values, this reeturns the sum (along axis=0) of the log-likelihood
+             (i.e. assumes independent observations). 
+        """
         # - sum (log pdf(x, theta),axis=0)
         #   where theta are the parameters (including loc and scale)
         #



More information about the Scipy-svn mailing list