[Xapian-tickets] [Xapian] #733: Change the way Features request statistics

Xapian nobody at xapian.org
Sat Aug 20 09:23:13 BST 2016


#733: Change the way Features request statistics
---------------------------------------------+----------------------------
        Reporter:  ayshtmr                   |      Owner:  ayshtmr
            Type:  enhancement               |     Status:  new
        Priority:  normal                    |  Milestone:
       Component:  Letor (Learning To Rank)  |    Version:  1.4.0
        Severity:  normal                    |   Keywords:  Letor features
      Blocked By:                            |   Blocking:
Operating System:  All                       |
---------------------------------------------+----------------------------
 At present, `Feature::Internal` class does the work of calculating
 statistics like normalised lengths, query term frequencies, etc,.
 `Feature` subclasses then request these statistics from `get_value()`
 method. Due to presence of Internal member in `Feature` class, subclassing
 `Feature` is not easy as well.

 The following changes need to be made:
 1. `Feature::Internal` should be eliminated and its functionality (i.e.
 calculating and supplying statistics to `Feature` subclasses) should be
 made part of `FeatureList` class (probably as `FeatureList::Internal`
 class). [[br]]

 2. It's possible that we could also do the thing `Weight` does, and have
 each `Feature` subclass report which statistics it needs, so `FeatureList`
 can calculate them each once in advance before calling `get_value()` on
 all its `Feature` objects.

--
Ticket URL: <https://trac.xapian.org/ticket/733>
Xapian <//xapian.org/>
Xapian



More information about the Xapian-tickets mailing list