You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Sean Owen (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/01/26 10:47:44 UTC

[jira] [Issue Comment Edited] (MAHOUT-959) VectorWritable does not preserve the laxPrecision flag

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

Sean Owen edited comment on MAHOUT-959 at 1/26/12 9:46 AM:
-----------------------------------------------------------

Writable is an agent for serialization, not data itself. In practice, the code that writes and reads data would rarely share a Writable. I suppose I would find it surprising if reading one vector affected how another potentially unrelated vector was written, as I don't think any Writable I know works this way.

There is no parallel set of in-memory representations for Vector that use float; it would add complexity but it would be nice to have. Your change does not 'fix' this. The point is not saving RAM; the Writable's role is serialization to network or storage. The point is saving I/O and disk space.

@Ted edited to say: yes you are right that Vector does not track its lax-ness; the serialized form certainly does.
                
      was (Author: srowen):
    Writable is an agent for serialization, not data itself. In practice, the code that writes and reads data would rarely share a Writable. I suppose I would find it surprising if reading one vector affected how another potentially unrelated vector was written, as I don't think any Writable I know works this way.

There is no parallel set of in-memory representations for Vector that use float; it would add complexity but it would be nice to have. Your change does not 'fix' this. The point is not saving RAM; the Writable's role is serialization to network or storage. The point is saving I/O and disk space.

@Ted no it's quite simple to remember this, just needs a bit, and in fact has long recorded and read this in serialized form.
                  
> VectorWritable does not preserve the laxPrecision flag
> ------------------------------------------------------
>
>                 Key: MAHOUT-959
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-959
>             Project: Mahout
>          Issue Type: Bug
>          Components: Math
>    Affects Versions: 0.6
>            Reporter: Rares Vernica
>            Assignee: Sean Owen
>         Attachments: MAHOUT-959.patch, VerctorWritable-laxPrecicison.patch
>
>
> When reading a vector, VectorWritable uses the laxPrecision flag to read with the right precision, but it does not preserve the flag in case the vector is written back.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira