xapian-letor: FeatureVector discussion

Ayush Tomar ayushtomar at gmail.com
Mon Jun 27 13:16:39 BST 2016


Hello James, Parth,

Following our discussion on IRC and on code review, the way FeatureVector
class works needs some discussion.

Presently, the FeatureVector class is defined as follows, with a fixed
number of feature count (19):

class FeatureVector::Internal : public Xapian::Internal::intrusive_base{
    friend class FeatureVector;
    double label;
    double score;
    std::map<int,double> fvals;
    int fcount;
    Xapian::docid did;

The two approaches that were discussed were:
1. Using enums as IDs for features in fvals.
2. Making fvals into a configurable vector of feature values.

The issues were that the first way would still assume an order in which the
features occur, and the second way would require the feature generation
code to be changed into lots of little classes, which might be an overhead
right now but would be a good functionality to have in future.

What would be the best approach here?
-- 
----------------------------------------------------------------------------
Kind Regards,
Ayush Tomar | My Webpage <http://ayshtmr.xyz> | LinkedIn
<https://in.linkedin.com/in/ayushtomar>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20160627/a2341582/attachment.html>


More information about the Xapian-devel mailing list