haojihu / tifuknn Goto Github PK
View Code? Open in Web Editor NEWkNN-based next-basket recommendation
License: Apache License 2.0
kNN-based next-basket recommendation
License: Apache License 2.0
Hi!! I am facing issue for code execution for my dataset which has some new fields and that are not numbers so any suggestion from ur side how should I proceed!
How to make a recommendation list for each customer?
nDCG的计算与我了解的不同。例如,top10推荐,最后取的推荐序列的前10个物品来计算DCG,取最后一个篮子中物品数来计算IDCG。(最后一个篮子物品数不固定)
def get_NDCG1(groundtruth, pred_rank_list, k): count = 0 dcg = 0 for pred in pred_rank_list: if count >= k: break if groundtruth[pred] == 1: dcg += (1) / math.log2(count + 1 + 1) count += 1 idcg = 0 num_real_item = np.sum(groundtruth) num_item = int(num_real_item) for i in range(num_item): idcg += (1) / math.log2(i + 1 + 1) ndcg = dcg / idcg return ndcg
Hi @HaojiHu
Thank you for your amazing work! Really enjoy reading your paper! It was amazing!
I have just spotted some minor errors that may need your clarification.
In TIFUKNN.py line 595 (def evaluate)
it seems like temporal_decay_sum_history_training and temporal_decay_sum_history_chunk both have the same input.
Should the latter be changed to test_chink instead?
Thank you very much in advance!
Hi! Is it possible for you to provide the data processing scripts for the 4 datasets used?
When I use the preprocessing code, the generated Baskets for the first Costumer ID is empty [[-1]]; despite the original dataset, the first user has around 12 Baskets. Is it meant to be empty, or is there a problem?
how to improve recall value as paper describe?
Is the reported experiment on the paper using the same dataset & train/test split as on github?
Cause I ran command python TIFUKNN.py ./data/Instacart_history.csv ./data/Instacart_future.csv 900 0.9 0.7 0.9 3 10
but got inconsistent results from the paper reported.
[My output]
recall: 0.24572586831510687
NDCG: 0.3308917426465621
[Paper]
recall: 0.3952
NDCG: 0.3825
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.