Giter Site home page Giter Site logo

haojihu / tifuknn Goto Github PK

View Code? Open in Web Editor NEW
95.0 5.0 26.0 64.99 MB

kNN-based next-basket recommendation

License: Apache License 2.0

Python 100.00%
knn-collaborative-filter market-basket-analysis next-baket-recommendation collaborative-filtering nearest-neighbors basket-recommendation recommender-system recommendation-system

tifuknn's People

Contributors

haojihu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tifuknn's Issues

Dataset

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!

nDCG calculation

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

temporal_decay_sum_history doesn't seems right

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!

image

Data processing scripts

Hi! Is it possible for you to provide the data processing scripts for the 4 datasets used?

First Costumer ID has empty Baskets set

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.