[ 
https://issues.apache.org/jira/browse/MAHOUT-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196353#comment-15196353
 ] 

ASF GitHub Bot commented on MAHOUT-1813:
----------------------------------------

GitHub user andrewpalumbo reopened a pull request:

    https://github.com/apache/mahout/pull/194

    MAHOUT-1813: Functional "apply" DSL for distributed and in-memory matrices

    We have functional "Assign" for in-memory matrices, e.g.:
    
    ```
        mxA := { x => x + 1 }
        mxA ::= { x=> x * 2 }
    ```
    
    However, we lack similar unary elementwise function capability with 
distributed matrices, because distributed matrices are logically immutable.
    The suggestion here is to use apply(func) to augment that capability for 
DRMs:
    
    ```
        drmA(x => x + 1)
        drmA(x => 2 * x)
    ```
    
    Handling sparse/dense functional assignments: Second optional parameter, 
evalZeros, can be one of TRUE, FALSE, or AUTO (default AUTO).
    It regulates treatement of 0 elements in matrices: whether we can skip 
assignments to 0 elements. AUTO (which is default) tests the
    supplied function whether it changes 0 elements:
    
        evalZeroTest = f(0) != 0
    
    Obviously, this will not work in all situations (e.g. non-deterministic 
functions), so we want to retain ability to explicitly override this
    with `true` or `false`.
    
    For completeness mostly, similar functional no-side-effect applies are 
implemented for in-memory types, e.g.:
    
    ```
        mxA(x => x + 1)
        mxA(x => 2 * x)
        mxA( (row, col, x) => x + 1)
    ```
    etc.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewpalumbo/mahout MAHOUT-1813

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/mahout/pull/194.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #194
    
----
commit 3a42189f254da5e1c2d3781f0865f4640f33fe94
Author: Andrew Palumbo <[email protected]>
Date:   2016-03-15T20:23:29Z

    Functional apply for in-core matrices and DRMs

----


> Functional "apply" DSL for distributed and in-memory matrices
> -------------------------------------------------------------
>
>                 Key: MAHOUT-1813
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1813
>             Project: Mahout
>          Issue Type: New Feature
>    Affects Versions: 0.11.2
>            Reporter: Andrew Palumbo
>            Assignee: Andrew Palumbo
>             Fix For: 0.12.0
>
>
> We have functional "Assign" for in-memory matrices, e.g.:
> {code}
>     mxA := { x => x + 1 }
>     mxA ::= { x=> x * 2 }
> {code}
> However, we lack similar unary elementwise function capability with 
> distributed matrices, because distributed matrices are logically immutable.
> The suggestion here is to use apply(func) to augment that capability for DRMs:
> {code}
>     drmA(x => x + 1)
>     drmA(x => 2 * x)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to