incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HAMA-170) Implementation of Matrix.Norm
Date Fri, 08 May 2009 09:51:45 GMT

    [ https://issues.apache.org/jira/browse/HAMA-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707294#action_12707294
] 

Edward J. Yoon commented on HAMA-170:
-------------------------------------

Oh, Thanks.

As you said, "The 1-norm is obtained by finding the sum of the absolute value of all the elements
in each column of the matrix. The largest of these sums is the 1-norm. In mathematical terms,
the 1-norm is simply the maximum absolute column sum of the matrix."

So,  if A =  {{1, 3}, {2, 4}} then ||A||1 = max(3, 7) = 7

Comments should be fixed. But, fortunately 1-Norm was correctly implemented as below.

1-NormMapper:
    for(Map.Entry<Writable, Writable> e : value.entrySet()) {
      rowSum += Math.abs(((DoubleEntry) e.getValue()).getValue());
    }

1-NormReducer:
    while (values.hasNext()) {
      max = Math.max(values.next().get(), max);
    }

> Implementation of Matrix.Norm
> -----------------------------
>
>                 Key: HAMA-170
>                 URL: https://issues.apache.org/jira/browse/HAMA-170
>             Project: Hama
>          Issue Type: Improvement
>          Components: implementation
>    Affects Versions: 0.1.0
>            Reporter: Edward J. Yoon
>            Assignee: Edward J. Yoon
>             Fix For: 0.1.0
>
>
>   enum Norm {
>     /** Maximum absolute row sum */
>     One,
>     /** The root of sum of the sum of squares */
>     Frobenius,
>     
>     /** Largest entry in absolute value */
>     Infinity,
>     
>     /** Largest entry in absolute value. Not a proper matrix norm  */
>     Maxvalue
>   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message