### changeset 12530:d70c99028ba3

Make helper functions for logistic_regression private.
author Rik Sat, 19 Mar 2011 13:53:38 -0700 0579a13f29a1 33716f289ba5 scripts/ChangeLog scripts/statistics/models/logistic_regression.m scripts/statistics/models/logistic_regression_derivatives.m scripts/statistics/models/logistic_regression_likelihood.m scripts/statistics/models/module.mk scripts/statistics/models/private/logistic_regression_derivatives.m scripts/statistics/models/private/logistic_regression_likelihood.m 5 files changed, 22 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
```--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,12 @@
+
+	* statistics/models/logistic_regression.m: Do not split function
+	declaration with line continuation.
+	* statistics/models/private/logistic_regression_likelihood.m,
+	statistics/models/private/logistic_regression_derivatives.m: Make
+	helper functions private.
+	* statistics/models/module.mk: Make helper functions private.
+

* plot/isocolors.m, plot/isonormals.m, plot/isosurface.m: Improve```
```--- a/scripts/statistics/models/logistic_regression.m
+++ b/scripts/statistics/models/logistic_regression.m
@@ -84,8 +84,7 @@
## Uses the auxiliary functions logistic_regression_derivatives and
## logistic_regression_likelihood.

-function [theta, beta, dev, dl, d2l, p] ...
-  = logistic_regression (y, x, print, theta, beta)
+function [theta, beta, dev, dl, d2l, p] = logistic_regression (y, x, print, theta, beta)

## check input
y = round (vec (y));```
```--- a/scripts/statistics/models/module.mk
+++ b/scripts/statistics/models/module.mk
@@ -1,9 +1,12 @@
FCN_FILE_DIRS += statistics/models

+statistics_models_PRIVATE_FCN_FILES = \
+  statistics/models/private/logistic_regression_derivatives.m \
+  statistics/models/private/logistic_regression_likelihood.m
+
statistics_models_FCN_FILES = \
statistics/models/logistic_regression.m \
-  statistics/models/logistic_regression_derivatives.m \
-  statistics/models/logistic_regression_likelihood.m
+  \$(statistics_models_PRIVATE_FCN_FILES)

FCN_FILES += \$(statistics_models_FCN_FILES)
```
```rename from scripts/statistics/models/logistic_regression_derivatives.m
rename to scripts/statistics/models/private/logistic_regression_derivatives.m
--- a/scripts/statistics/models/logistic_regression_derivatives.m
+++ b/scripts/statistics/models/private/logistic_regression_derivatives.m
@@ -18,8 +18,10 @@

## -*- texinfo -*-
## @deftypefn {Function File} {[@var{dl}, @var{d2l}] =} logistic_regression_derivatives (@var{x}, @var{z}, @var{z1}, @var{g}, @var{g1}, @var{p})
-## Called by logistic_regression.  Calculates derivates of the
-## log-likelihood for ordinal logistic regression model.
+## Calculate derivatives of the log-likelihood for ordinal logistic regression
+## model.
+## Private function called by @code{logistic_regression}.
+## @seealso{logistic_regression}
## @end deftypefn

## Author: Gordon K. Smyth <gks@maths.uq.oz.au>```
```rename from scripts/statistics/models/logistic_regression_likelihood.m
rename to scripts/statistics/models/private/logistic_regression_likelihood.m
--- a/scripts/statistics/models/logistic_regression_likelihood.m
+++ b/scripts/statistics/models/private/logistic_regression_likelihood.m
@@ -18,8 +18,9 @@

## -*- texinfo -*-
## @deftypefn {Function File} {[@var{g}, @var{g1}, @var{p}, @var{dev}] =} logistic_regression_likelihood (@var{y}, @var{x}, @var{beta}, @var{z}, @var{z1})
-## Calculates likelihood for the ordinal logistic regression model.
-## Called by logistic_regression.
+## Calculate the likelihood for the ordinal logistic regression model.
+## Private function called by @code{logistic_regression}.
+## @seealso{logistic_regression}
## @end deftypefn

## Author: Gordon K. Smyth <gks@maths.uq.oz.au>```