Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an implementation of the NARM (Neural Attentive Session-based Recommendation) model. The model is one of the earliest proposed neural model (another one is GRU4Rec) in the line of SBR research. NARM is often used as a baseline in the later research papers.
Changes
models/matching/narm.py
. A new line that imports the model is added inmodels/matching/__init__.py
. The implementation follows the CIKM'17 paper Neural Attentive Session-based Recommendation, its original Thenao implementation, as well as a Pytorch implementation.examples/matching/data/session_based/preprocess_session_based.py
. The pipeline processes the data in the same way as described in the NARM paper. The statistics of output datasets agree with the ones described in the earlier Pytorch implementation of NARM. However, the current implementation is mainly based on pandas thus is faster and easier to understand. This pipeline can be recycled later for processing other SBR benchmark datasets.examples/matching/data/session_based
.examples/matching/run_sbr.py
. The hyper parameters are set according to section 4.3.2 in the NARM paper. This file could also be recycled later for evaluating other SBR models.Results
Future work