[
https://issues.apache.org/jira/browse/MAHOUT-959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193366#comment-13193366
]
Dmitriy Lyubimov commented on MAHOUT-959:
-----------------------------------------
Hm. After applying the patch and looking at the code for the second time, i am
tentatively changing vote to -1 on this, seeking for more input (perhaps from
Ted)?
What this patch really does, is ensuring that the next vector set into writable
will be written lax or not based on last read operation of such wrtable
envelope.
This doesn't seem conceptually coherent:
* last vector read is not necessarily the same vector written. So perhaps
nothing necessarily connects read data and data written logically.
* VectorWritable is just a serialization envelope, but not the actual data
object. Hence, laxPrecision acts here as property of serialization only, but
not actual vector use (the vector itself will always be using double
arithmetics precision once materialized).
Perhaps this patch should really address interrogation of last read operation
for precision and then set that (if desired) for all writes from now on
explicitly, if that's what really meant. Not surprisingly, the method is called
"writesLaxPrecision", emphasizing that is property of write serialization only.
I would probably have added a method, something like
"getLastReadLaxPrecision()" to interrogate last read precision, if that's
really what is desired here. But i would keep write precision in isolation from
read effects by default.
> 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: Dmitriy Lyubimov
> Fix For: 0.6, 0.7
>
> Attachments: 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