You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Anatoliy Kats (Created) (JIRA)" <ji...@apache.org> on 2011/11/25 14:47:40 UTC
[jira] [Created] (MAHOUT-896) Improve readability of
AbstractRecommender class
Improve readability of AbstractRecommender class
------------------------------------------------
Key: MAHOUT-896
URL: https://issues.apache.org/jira/browse/MAHOUT-896
Project: Mahout
Issue Type: Improvement
Components: Collaborative Filtering
Affects Versions: 0.6
Reporter: Anatoliy Kats
Assignee: Sean Owen
Priority: Trivial
Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157223#comment-13157223 ]
Anatoliy Kats commented on MAHOUT-896:
--------------------------------------
Patch submitted. The method name processUser is uninformative, since the word 'process' can refer to anything. The original names for the parameters are also confusing: it is not clear that trainingUsers and testingUserPrefs refer to the same kinds of items. The word 'Pref' is, ahem, preferable, since the Preference class includes the User ID, Item ID, and Preference Value. So, I renamed all the variables to use that term only.
What do you think?
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Updated] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anatoliy Kats updated MAHOUT-896:
---------------------------------
Status: Patch Available (was: Open)
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Updated] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anatoliy Kats updated MAHOUT-896:
---------------------------------
Attachment: MAHOUT-896.patch
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Updated] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anatoliy Kats updated MAHOUT-896:
---------------------------------
Status: Open (was: Patch Available)
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Sean Owen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157244#comment-13157244 ]
Sean Owen commented on MAHOUT-896:
----------------------------------
I am ex-Google too, and agree. This change does not meaningfully alter readability, to me, or else I would have named it differently in the first place. But I don't mind changing it if you think it's more readable this way.
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Fix For: 0.6
>
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Updated] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anatoliy Kats updated MAHOUT-896:
---------------------------------
Summary: Improve readability of AbstractDifferenceRecommenderEvaluator class (was: Improve readability of AbstractRecommender class)
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Sean Owen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157224#comment-13157224 ]
Sean Owen commented on MAHOUT-896:
----------------------------------
OK. I think this is fairly trivial, renaming things like "testUserPrefs" to "testPrefs". I don't mind it either. The patch uses tab formatting, but I can fix that on this side.
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157239#comment-13157239 ]
Anatoliy Kats commented on MAHOUT-896:
--------------------------------------
It is. I guess I became a stickler for readability after a Google internship:) Code is read a lot more than it's written, right?
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Fix For: 0.6
>
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractRecommender class
Posted by "Sean Owen (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157160#comment-13157160 ]
Sean Owen commented on MAHOUT-896:
----------------------------------
OK, do you have any specific suggestions?
The fields and methods are...
dataModel
candidateItemsStrategy
getDefaultCandidateItemsStrategy
recommend
setPreference
removePreference
getDataModel
getAllOtherItems
This seems pretty clear. This is hardly a complex class either. It also forms part of the public API.
I have a hard time imagining a naming change I would support.
> Improve readability of AbstractRecommender class
> ------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Resolved] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Sean Owen (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen resolved MAHOUT-896.
------------------------------
Resolution: Fixed
Fix Version/s: 0.6
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Fix For: 0.6
>
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157295#comment-13157295 ]
Hudson commented on MAHOUT-896:
-------------------------------
Integrated in Mahout-Quality #1198 (See [https://builds.apache.org/job/Mahout-Quality/1198/])
MAHOUT-896 rename some internal vars and methods
srowen : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1206251
Files :
* /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Fix For: 0.6
>
> Attachments: MAHOUT-896.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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
[jira] [Commented] (MAHOUT-896) Improve readability of
AbstractDifferenceRecommenderEvaluator class
Posted by "Anatoliy Kats (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157167#comment-13157167 ]
Anatoliy Kats commented on MAHOUT-896:
--------------------------------------
Sorry, I meant AbstractDifferenceRecommenderEvaluator. They are simple changes, I'll submit my specific proposals as a patch in half an hour or so.
> Improve readability of AbstractDifferenceRecommenderEvaluator class
> -------------------------------------------------------------------
>
> Key: MAHOUT-896
> URL: https://issues.apache.org/jira/browse/MAHOUT-896
> Project: Mahout
> Issue Type: Improvement
> Components: Collaborative Filtering
> Affects Versions: 0.6
> Reporter: Anatoliy Kats
> Assignee: Sean Owen
> Priority: Trivial
> Labels: newbie
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Change the variable and private method names so that they are internally consistent, and their purpose is more clear.
--
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