mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitriy Lyubimov (JIRA)" <>
Subject [jira] [Commented] (MAHOUT-1599) Add rand() operator to math-scala
Date Wed, 30 Jul 2014 00:32:38 GMT


Dmitriy Lyubimov commented on MAHOUT-1599:

ah.sorry. there's no nonZero iterator on matrices, it seems, only on vectors. So one of (not
very efficient) corrections for the above i know of would be 

> Add rand() operator to math-scala
> ---------------------------------
>                 Key: MAHOUT-1599
>                 URL:
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Math
>    Affects Versions: 0.9
>            Reporter: Felix Schüler
>            Priority: Trivial
>              Labels: dsl, math, operator, random, scala
>         Attachments: MAHOUT-1599.patch
> I was looking at the scala-math operators and missed a rand(m, n) operator that generates
a m x n matrix filled with random numbers.
> I wanted random numbers from a uniform distribution over a specific interval so I implemented
a simple uniform random number generator.
> the rand(m, n, r) function takes any AbstractSamplerFunction and fills the matrix entries
with the numbers generated by its sample() method.

This message was sent by Atlassian JIRA

View raw message