recoreco
recoreco copied to clipboard
Add explicit for-item mapping to nearest-neighbor set
Currently, write_indicators()
iterates the vector of nearest neighbors using the index as the for_item
, which is incorrect. While the ordering of operations in indicators()
should ensure items_to_rescore
is ordered by index accordance with item_id as generated (in FIFO order from the interactions), that appears not to be the case any longer. Instead of relying on underlying collections to be order-preserving, this instead returns a tuple with the for_item
id along with the FnvHashSet of nearest neighbors from rescore()
.