All Projects → lenguyenthedat → raptor

lenguyenthedat / raptor

Licence: other
A lightweight product recommendation system (Item Based Collaborative Filtering) developed in Haskell.

Programming Languages

haskell
3896 projects
shell
77523 projects

Projects that are alternatives of or similar to raptor

Cornac
A Comparative Framework for Multimodal Recommender Systems
Stars: ✭ 308 (+805.88%)
Mutual labels:  collaborative-filtering, recommendation-system, recommendation-engine
recommender
NReco Recommender is a .NET port of Apache Mahout CF java engine (standalone, non-Hadoop version)
Stars: ✭ 35 (+2.94%)
Mutual labels:  collaborative-filtering, recommendation-system, recommendation-engine
Movie Recommender System
Basic Movie Recommendation Web Application using user-item collaborative filtering.
Stars: ✭ 85 (+150%)
Mutual labels:  collaborative-filtering, recommendation-system, recommendation-engine
retailbox
🛍️RetailBox - eCommerce Recommender System using Machine Learning
Stars: ✭ 32 (-5.88%)
Mutual labels:  ecommerce, recommendation-system, recommendation-engine
recommender system with Python
recommender system tutorial with Python
Stars: ✭ 106 (+211.76%)
Mutual labels:  collaborative-filtering, recommendation-system, recommendation-engine
Movie Recommendation Engine
Movie Recommender based on the MovieLens Dataset (ml-100k) using item-item collaborative filtering.
Stars: ✭ 21 (-38.24%)
Mutual labels:  collaborative-filtering, recommendation-engine
Recbole
A unified, comprehensive and efficient recommendation library
Stars: ✭ 780 (+2194.12%)
Mutual labels:  collaborative-filtering, recommendation-system
MachineLearning
Machine learning for beginner(Data Science enthusiast)
Stars: ✭ 104 (+205.88%)
Mutual labels:  recommendation-system, recommendation-engine
Movie
Personalized real-time movie recommendation system
Stars: ✭ 37 (+8.82%)
Mutual labels:  collaborative-filtering, recommendation-system
TIFUKNN
kNN-based next-basket recommendation
Stars: ✭ 38 (+11.76%)
Mutual labels:  collaborative-filtering, recommendation-system
Deeprec
An Open-source Toolkit for Deep Learning based Recommendation with Tensorflow.
Stars: ✭ 954 (+2705.88%)
Mutual labels:  collaborative-filtering, recommendation-system
Deeprecommender
Deep learning for recommender systems
Stars: ✭ 1,593 (+4585.29%)
Mutual labels:  collaborative-filtering, recommendation-engine
Recommender
A C library for product recommendations/suggestions using collaborative filtering (CF)
Stars: ✭ 238 (+600%)
Mutual labels:  collaborative-filtering, recommendation-engine
Recommendationsystem
Book recommender system using collaborative filtering based on Spark
Stars: ✭ 244 (+617.65%)
Mutual labels:  collaborative-filtering, recommendation-system
Recsys2019 deeplearning evaluation
This is the repository of our article published in RecSys 2019 "Are We Really Making Much Progress? A Worrying Analysis of Recent Neural Recommendation Approaches" and of several follow-up studies.
Stars: ✭ 780 (+2194.12%)
Mutual labels:  collaborative-filtering, recommendation-system
Person-Recommendation-Algorithms
推荐算法个人学习笔记以及代码实战
Stars: ✭ 50 (+47.06%)
Mutual labels:  collaborative-filtering, recommendation-system
RecommendationEngine
Source code and dataset for paper "CBMR: An optimized MapReduce for item‐based collaborative filtering recommendation algorithm with empirical analysis"
Stars: ✭ 43 (+26.47%)
Mutual labels:  collaborative-filtering, recommendation-engine
Recommendation-System-Baseline
Some common recommendation system baseline, with description and link.
Stars: ✭ 34 (+0%)
Mutual labels:  collaborative-filtering, recommendation-system
Tutorials
AI-related tutorials. Access any of them for free → https://towardsai.net/editorial
Stars: ✭ 204 (+500%)
Mutual labels:  collaborative-filtering, recommendation-system
mildnet
Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
Stars: ✭ 76 (+123.53%)
Mutual labels:  ecommerce, recommendation-system

Raptor

An Online Retail Recommendation Engine developed in Haskell.

Raptor learns from customer behaviors when they do online shopping:

  • View an item.
  • Add an item into cart.
  • Purchase an item.

Currently there are 3 different algorithms - specified in raptor.hs:

  • Original Jaccard Distance, based heavily on information about items that has been purchased / added to cart together.
  • Bayes Jaccard Distance, a modified version of Jaccard Distance, but still very similar.
  • VTD, a slightly different approach. The idea of this approach is to look closer as customer Views data. Basically tries to answer the question: if a customer view this item, what are the most likely items that the customer is going to buy.

Base on the nature of each algorithms, Original and Bayes Jaccard are more applicable for a cart-page recommendations (i.e "customers who bought these items also bought"), while VTD is more applicable for the product-page recommendations (i.e "products related or similar to this item").

Wilson Score (of 95% confidence) is used to take care of significance in the approaches.

Raptor In Action

The below real-world results were achieved by using a combination of Raptor as a core Collaborative Filtering engine together with a numerous of domain specific knowledge engines and tweaks:

Sample Input

$ cat test/Data/VTD_view_sg.csv 
sku0	cust1 cust2 cust3 cust4
sku1	cust1 cust2 cust3 cust4 cust5
sku2	cust2 cust4 cust5
sku3	cust1 cust2
sku4	cust4 cust5 cust1 cust3
sku5	cust1 cust2 cust3
sku6	cust5 cust3
sku7	cust4 cust5
sku8	cust1 cust4
sku9	cust2 cust4

$ cat test/Data/VTD_cart_sg.csv 
sku0	cust1 cust2
sku1	cust1 cust2 cust3
sku2	cust2 cust4
sku3	cust1 cust2
sku4	cust4 cust5 cust1 cust3
sku5	cust1
sku6	cust5 cust3
sku7	cust4
sku8	cust1 cust4
sku9	cust2

$ cat test/Data/VTD_purchased_sg.csv 
sku0	cust1 cust2
sku1	cust1 cust2 cust3
sku2	cust2
sku3	cust1 cust2
sku4	cust4 cust5 cust3
sku5	cust1
sku6	cust5 cust3
sku7	cust4
sku8	cust1 cust4
sku9	cust2

$ cat test/Data/sku_male_sg.csv 
sku5
sku6
sku7
sku8
sku9

$ cat test/Data/sku_female_sg.csv 
sku0
sku1
sku2
sku3
sku4

$ cat test/Data/instock_skus_sg.csv 
sku0
sku1
sku2
sku3
sku4
sku5
sku6
sku7
sku8

$ cat test/Data/valid_skus_sg.csv 
sku1
sku2
sku3
sku4
sku5
sku6
sku7
sku8

Clone and build:

Clone the repo:

$ https://github.com/lenguyenthedat/raptor.git

Build with Docker

$ cd raptor/
$ sudo docker build --rm=true -t raptor .

Build with cabal sandbox:

$ cabal install
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/datle/GitHub/cabinet/raptor/.cabal-sandbox
Configuring split-0.2.2...
Downloading strict-0.3.2...
Configuring text-1.2.0.0...
Configuring strict-0.3.2...
Building text-1.2.0.0...
Building split-0.2.2...
Building strict-0.3.2...
Installed split-0.2.2
Installed strict-0.3.2
Downloading nlp-scores-0.6.2...
Configuring nlp-scores-0.6.2...
Building nlp-scores-0.6.2...
Installed nlp-scores-0.6.2
Installed text-1.2.0.0
Configuring hashable-1.2.2.0...
Building hashable-1.2.2.0...
Installed hashable-1.2.2.0
Configuring unordered-containers-0.2.5.1...
Building unordered-containers-0.2.5.1...
Installed unordered-containers-0.2.5.1
Configuring raptor-0.1.0.0...
Building raptor-0.1.0.0...
Installed raptor-0.1.0.0

Build with cabal-dev:

$ cabal-dev install
Resolving dependencies...
Configuring raptor-0.1.0.0...
Building raptor-0.1.0.0...
Preprocessing executable 'raptor' for raptor-0.1.0.0...
Warning: No documentation was generated as this package does not contain a
library. Perhaps you want to use the --executables flag.
Installing executable(s) in /Users/datle/GitHub/cabinet/Raptor/cabal-dev//bin
Installed raptor-0.1.0.0
Warning: could not create symlinks in /Users/datle/Library/Haskell/bin for
raptor because the files exist there already and are
not managed by cabal. You can create symlinks for these executables manually
if you wish. The executable files have been installed at
/Users/xxx/GitHub/cabinet/Raptor/cabal-dev/bin/raptor

Build with ghc:

$ ghc raptor.hs
[1 of 1] Compiling Main             ( raptor.hs, raptor.o )
Linking raptor ...

Sample output:

Run with docker: use docker run raptor as a prefix for every command, for example:

$ docker run raptor .cabal-sandbox/bin/raptor sg 3 original test/

original

$ .cabal-sandbox/bin/raptor sg 3 original test/

$ cat test/Result/original/Raptor_sg.csv 
sg	sku5	7.38-sku8
sg	sku6	
sg	sku7	7.38-sku8
sg	sku8	7.38-sku5	7.38-sku7
sg	sku9	
sg	sku0	18.00-sku3	14.11-sku1	7.06-sku2
sg	sku1	14.11-sku3	5.28-sku2	4.65-sku4
sg	sku2	7.06-sku3	5.28-sku1	0.60-sku4
sg	sku3	14.11-sku1	7.06-sku2	0.60-sku4
sg	sku4	4.65-sku1	0.60-sku2	0.60-sku3

bayes

$ .cabal-sandbox/bin/raptor sg 3 bayes test/

$ cat test/Result/bayes/Raptor_sg.csv 
sg	sku5	6.15-sku8
sg	sku6	
sg	sku7	6.15-sku8
sg	sku8	6.15-sku5	6.15-sku7
sg	sku9	
sg	sku0	9.68-sku3	8.22-sku1	6.15-sku2
sg	sku1	9.68-sku3	6.15-sku2	3.01-sku4
sg	sku2	6.15-sku1	6.15-sku3
sg	sku3	9.68-sku1	6.15-sku2
sg	sku4	3.01-sku1

vtd

$ .cabal-sandbox/bin/raptor sg 3 vtd test/

$ cat test/Result/vtd/Raptor_sg.csv 
sg	sku5	9.45-sku6	9.45-sku8
sg	sku6	
sg	sku7	9.45-sku6	9.45-sku8
sg	sku8	9.45-sku5	9.45-sku7
sg	sku9	9.45-sku7	9.45-sku8
sg	sku0	15.82-sku1	15.00-sku3	11.76-sku4
sg	sku1	15.82-sku4	15.00-sku3	4.56-sku2
sg	sku2	15.00-sku4	9.45-sku3	4.56-sku1
sg	sku3	15.00-sku1	9.45-sku2
sg	sku4	9.68-sku1	9.45-sku3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].