[
https://issues.apache.org/jira/browse/MAHOUT-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Owen resolved MAHOUT-360.
------------------------------
Resolution: Fixed
Fix Version/s: 0.4
Assignee: Sean Owen
Yeah that's fine, I'll just do some proper rounding. This worked for earlier
versions where everything was < 1.
> the pref score field of output of
> org.apache.mahout.cf.taste.hadoop.item.RecommenderJob has been truncated
> -----------------------------------------------------------------------------------------------------------
>
> Key: MAHOUT-360
> URL: https://issues.apache.org/jira/browse/MAHOUT-360
> Project: Mahout
> Issue Type: Bug
> Components: Collaborative Filtering
> Affects Versions: 0.4
> Reporter: Hui Wen Han
> Assignee: Sean Owen
> Fix For: 0.4
>
> Attachments: screenshot-1.jpg
>
>
> the pref score field of output of
> org.apache.mahout.cf.taste.hadoop.item.RecommenderJob has been truncated if
> the pref score exceed six byte.
> in RecommendedItemsWritable.class
> @Override
> public String toString() {
> StringBuilder result = new StringBuilder(200);
> result.append('[');
> boolean first = true;
> for (RecommendedItem item : recommended) {
> if (first) {
> first = false;
> } else {
> result.append(',');
> }
> result.append(item.getItemID());
> result.append(':');
> String valueString = String.valueOf(item.getValue());
> // Is this rounding too crude?
> if (valueString.indexOf('E') >= 0) {
> valueString = "0.0";
> } else if (valueString.length() > 6) {
> valueString = valueString.substring(0, 6); //here may cause
> problem,we can reserve all the bytes ,or just one byte decimal fraction
> }
> result.append(valueString);
> }
> result.append(']');
> return result.toString();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.