On Wed, Jul 25, 2012 at 09:00:44AM 0500, Becksfort, Jared wrote:
> I have another question, this time about the API. The covariance matrix of a multivariate
normal distribution is called sigma in a number of R libraries, but I am not sure it is called
that everywhere. I named the parameters and get methods for the covariance matrix things
like "getSigma" but mentioned covariance matrix in the comments. Do the developers here have
a preference between getSigma and getCovarianceMatrix? I can change the parameters accordingly.
Referring to
http://en.wikipedia.org/wiki/Multivariate_normal_distribution
you are right that the matrix is represented by the capital "Sigma" Greek
letter.
However, in other places in the CM's code, similar data are retrieved with
a method called "getCovariances()".[1]
IMO, it's clearer that the method name refers to the concept (covariance)
rather than the notation (Greek letter).
Hence, I propose to just change the method name:
getSigma > getCovariances
(and the name of the instance variable, to reduce possible confusion when
reading the code).
And instead of providing
double[] getVariances()
(elements on the diagonal of the matrix),
I'd provided, as a convenience,
double[] getStandardDeviation()
(squareroot of the elements on the diagonal).
Regards,
Gilles
[1] org.apache.commons.math3.optimization.general.AbstractLeastSquaresOptimizer

To unsubscribe, email: devunsubscribe@commons.apache.org
For additional commands, email: devhelp@commons.apache.org
