[mlpack-svn] [MLPACK] #342: Remove repetitive GetRecommendations() functions
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Thu Apr 3 15:42:38 EDT 2014
#342: Remove repetitive GetRecommendations() functions
----------------------------+-----------------------------------------------
Reporter: siddharth.950 | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: mlpack | Resolution:
Keywords: | Blocking:
Blocked By: |
----------------------------+-----------------------------------------------
Comment (by rcurtin):
Hey Siddharth,
I tried to catch you in IRC but you weren't there at the same times I was.
I took a look at the current CF interface, and you are right that it can
definitely be improved. I think maybe a better way to solve the problem,
though, is to make the API more similar to that of NeighborSearch. The
NeighborSearch class offers a Search() function (similar to
CF::GetRecommendations()) which requires the parameter k (the number of
neighbors being searched for). That value k isn't held in the class; only
in that method when it is called.
I think maybe a good way to go is to refactor CF so that
GetRecommendations() requires the parameter numRecs (the number of
recommendations), but the 'neighbours' parameter (or
'numUsersForSimilarity' as it is stored in the class) is set via
NumUsersForSimilarity(). That is, the GetRecommendations() function will
require parameters specifying the size of the output it will give, but
parameters relating to how the calculation is actually performed are set
either in the constructor or with getters/setters. That would be the same
way that NeighborSearch works.
I wanted to get your thoughts, though, before I refactored the patch to
work like that.
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/342#comment:1>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.
More information about the mlpack-svn
mailing list