[
https://issues.apache.org/jira/browse/MATH-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421328#comment-13421328
]
Gilles commented on MATH-815:
-----------------------------
In the test classes:
* Please remove all the "throws Exception" clauses. There are no checked
exceptions in CM.
* The "testSampling" method should probably be _defined_ in the (abstract)
parent class, i.e. once for all implementations. I think that we should
probably adapt the corresponding code in "RealDistributionAbstractTest". Maybe
that it is not easy; if so, the issue should definitely be raised on the "dev"
ML.
About the API of {{MultivariateNormalDistribution}}:
* {{getColumnDimension}} should probably be simply {{getDimensions}}. And it
should actually be defined in the base class (which stores a "numDimensions"
instance variable).
* To be consistent with class {{NormalDistribution}}, {{getMu}} should become
{{getMean}}.
* Unless I'm mistaken, there seems to be a contradiction: the covariance matrix
is called "sigma" (instance variable and accessor method) whereas it should
rather be "covariance".
* For consistency, the {{getVariances}} method should be replaced with a
{{getStandardDeviation}} method.
In {{AbstractMultivariateRealDistribution}}:
* The usage of {{RandomData}} is deprecated (cf. MATH-823). Please store an
instance of {{RandomGenerator}} (to be initialized in the constructor).
* The "sample()" method should be "abstract" (instead of returning a useless
array).
* "numDimensions" should be "private" and "final" (and initialized by the
constructor).
If anything is not clear, do not hesitate to ask on the "dev" ML.
> Multivariate Normal Distribution
> --------------------------------
>
> Key: MATH-815
> URL: https://issues.apache.org/jira/browse/MATH-815
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Jared Becksfort
> Priority: Minor
> Attachments: mvn.tgz, mvn2.tgz, patch
>
> Original Estimate: 1m
> Remaining Estimate: 1m
>
> I will submit a class for Multivariate Normal Distributions. Not sure if it
> will allow sampling initially.
> > Hello,
> >
> > I have implemented some classes for multivariate Normal distributions,
> > multivariate normal mixture models, and an expectation maximization fitting
> > class for the mixture model. I would like to submit it to Apache Commons
> > Math. I still have some touching up to do so that they fit the style
> > guidelines and implement the correct interfaces. Before I do so, I thought
> > I would at least ask if the developers of the project are interested in me
> > submitting them.
> >
> > Thanks,
> > Jared Becksfort
> Dear Jared,
> Yes, that would be very nice to have such an addition! Remember to also
> include unit tests (refer to the current ones for examples). The best would
> be to split a submission up into multiple minor ones, each covering a natural
> submission (e.g. multivariate Normal distribution in one submission), and
> create an issue as described at
> http://commons.apache.org/math/issue-tracking.html .
> If you run into any problems, please do not hesitate to ask on this mailing
> list.
> Cheers, Mikkel.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira