[ https://issues.apache.org/jira/browse/MAHOUT-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717502#action_12717502 ]
Grant Ingersoll commented on MAHOUT-130: ---------------------------------------- {quote} val = 0; for (int i = 0; i< cardinality(); i++){ val += Math.pow(getQuick(i), power); } val = vec.zSum(); {quote} Shall I assume this last val assignment is a typo? Also, how much rounding error would you expect? I notice a small difference (thousandths place) when Implementing w/o the vector approach: norm: [s3, 0:0.30010006671856176, 1:0.6002001334371235, 2:0.9003002001556853, ] is not equal to expected: [s3, 0:0.3028534321386899, 1:0.6057068642773799, 2:0.9085602964160698, ] > Vector should allow for other normalize powers than the L-2 norm > ---------------------------------------------------------------- > > Key: MAHOUT-130 > URL: https://issues.apache.org/jira/browse/MAHOUT-130 > Project: Mahout > Issue Type: Improvement > Reporter: Grant Ingersoll > Assignee: Grant Ingersoll > Priority: Minor > Attachments: MAHOUT-130.patch > > > Modify Vector to allow other normalize functions for the Vector > See > http://www.lucidimagination.com/search/document/bf3a7a7a004d4191/norm_calculations -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.