[
https://issues.apache.org/jira/browse/MAHOUT-550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934230#action_12934230
]
Ted Dunning commented on MAHOUT-550:
------------------------------------
Some comments:
OperationNotSupportedException is not a good idea. If you need to use a
pre-existing exception like this, try UnsupportedOperationException from
java.lang. Picking a random exception out of javax.timing is just confusing.
I think that an enum would be better for LINEAR, GAUSSIAN, GAUSSIAN01. For
most applications of random matrices, unit normal distributions are all that is
needed.
The comment on the 5 argument constructor says Vector, should say Matrix.
I don't think that it is worth the memory to keep the cache matrix around.
Instead, like() should construct a matrix and you should forget caching.
The implementation of gaussian01 is probably incorrect since the result does
not have zero mean. Using nextGaussian() is better anyway.
You shouldn't need to over-ride any math from AbstractMatrix.
It looks like a lot of your tests are copied from the standard matrix test
case. Why not just inherit?
> Add RandomVector and RandomMatrix
> ---------------------------------
>
> Key: MAHOUT-550
> URL: https://issues.apache.org/jira/browse/MAHOUT-550
> Project: Mahout
> Issue Type: New Feature
> Components: Math
> Reporter: Lance Norskog
> Fix For: 0.5
>
> Attachments: RandomMatrix.patch
>
>
> Add Vector and Matrix implementations that generate a unique and reproducible
> random number for each index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.