Click Model Implementation

James Aylett james at tartarus.org
Fri Jul 14 08:05:16 BST 2017


On 11 Jul 2017, at 15:25, Vivek Pal <vivekpal.dtu at gmail.com> wrote:

> Now that the clickstream logging PR (#161) is close to getting merged
> I'm starting to move onto the next step i.e. the implementation of DBN
> click model for which I think it'd be best to discuss the approach that
> I intend to take and the classes required.

Excellent!

> I'm thinking of starting with the implementation of a base class Model
> to enable the implementation of DBN click model as its subclass
> and more click models classes in the future.

I'd strongly suggest that you start by implementing just one class first, and then refactoring to make a class hierarchy only when you need to. It theoretically takes slightly longer that way, but means you don't have to predict everything about the class structure until you've implemented one version and are designing the second, which is much easier. In practice that often ends up faster overall, because you're less likely to go down a dead end path early on.

> DBN model can be implemented as two classes, simplified DBN model
> class (SDBM) amd the normal DBN class (DBN). Also, as discussed
> during the meeting earlier, I would be focusing on the SDBN class first.

So I think you should go ahead with SDBN, and not worry about the class hierarchy.

What sort of performance constraints are there on the implementation? Which language are you proposing building this in?

> And I was wondering if it'd be recommended to open a small PR
> with the implementation of the base class as soon as it's ready or
> just a single PR later complete with the implementation of SDBN
> model?

That's not relevant if you just implement SDBN directly first.

J

-- 
 James Aylett
 devfort.com — spacelog.org — tartarus.org/james/




More information about the Xapian-devel mailing list