All Projects → criteo-research → Cause

criteo-research / Cause

Licence: apache-2.0
Code for the Recsys 2018 paper entitled Causal Embeddings for Recommandation.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cause

Laserembeddings
LASER multilingual sentence embeddings as a pip package
Stars: ✭ 125 (-39.61%)
Mutual labels:  embeddings
Entity2rec
entity2rec generates item recommendation using property-specific knowledge graph embeddings
Stars: ✭ 159 (-23.19%)
Mutual labels:  embeddings
Parallax
Tool for interactive embeddings visualization
Stars: ✭ 192 (-7.25%)
Mutual labels:  embeddings
Chars2vec
Character-based word embeddings model based on RNN for handling real world texts
Stars: ✭ 130 (-37.2%)
Mutual labels:  embeddings
Embedding As Service
One-Stop Solution to encode sentence to fixed length vectors from various embedding techniques
Stars: ✭ 151 (-27.05%)
Mutual labels:  embeddings
Cx db8
a contextual, biasable, word-or-sentence-or-paragraph extractive summarizer powered by the latest in text embeddings (Bert, Universal Sentence Encoder, Flair)
Stars: ✭ 164 (-20.77%)
Mutual labels:  embeddings
Sytora
A sophisticated smart symptom search engine
Stars: ✭ 111 (-46.38%)
Mutual labels:  embeddings
Food2vec
🍔
Stars: ✭ 199 (-3.86%)
Mutual labels:  embeddings
Pytorch Nlp
Basic Utilities for PyTorch Natural Language Processing (NLP)
Stars: ✭ 1,996 (+864.25%)
Mutual labels:  embeddings
Vec4ir
Word Embeddings for Information Retrieval
Stars: ✭ 188 (-9.18%)
Mutual labels:  embeddings
Graph2gauss
Gaussian node embeddings. Implementation of "Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via Ranking".
Stars: ✭ 135 (-34.78%)
Mutual labels:  embeddings
Elastiknn
Elasticsearch plugin for nearest neighbor search. Store vectors and run similarity search using exact and approximate algorithms.
Stars: ✭ 139 (-32.85%)
Mutual labels:  embeddings
Jodie
A PyTorch implementation of ACM SIGKDD 2019 paper "Predicting Dynamic Embedding Trajectory in Temporal Interaction Networks"
Stars: ✭ 172 (-16.91%)
Mutual labels:  embeddings
Hash Embeddings
PyTorch implementation of Hash Embeddings (NIPS 2017). Submission to the NIPS Implementation Challenge.
Stars: ✭ 126 (-39.13%)
Mutual labels:  embeddings
Research2vec
Representing research papers as vectors / latent representations.
Stars: ✭ 192 (-7.25%)
Mutual labels:  embeddings
Dna2vec
dna2vec: Consistent vector representations of variable-length k-mers
Stars: ✭ 117 (-43.48%)
Mutual labels:  embeddings
Cofactor
CoFactor: Regularizing Matrix Factorization with Item Co-occurrence
Stars: ✭ 160 (-22.71%)
Mutual labels:  embeddings
Sensegram
Making sense embedding out of word embeddings using graph-based word sense induction
Stars: ✭ 209 (+0.97%)
Mutual labels:  embeddings
Vectorai
Vector AI — A platform for building vector based applications. Encode, query and analyse data using vectors.
Stars: ✭ 195 (-5.8%)
Mutual labels:  embeddings
Datastories Semeval2017 Task4
Deep-learning model presented in "DataStories at SemEval-2017 Task 4: Deep LSTM with Attention for Message-level and Topic-based Sentiment Analysis".
Stars: ✭ 184 (-11.11%)
Mutual labels:  embeddings

CausE

Python code for the RecSys 2018 paper entitled 'Causal Embeddings for Recommendation' using Tensorflow. A pre-print version of the paper can be found here - https://arxiv.org/abs/1706.07639

Code Organisation

The code is organized as follows:

  • causal_prod2vec.py - Used to run the CausE-avg method from the paper, where users response under the uniform exposure is averaged into a single vector.
  • causal_prod2vec2i.py - Used to run the CausE-prod-T and CausE-prod-C methods from the paper, where users response under the uniform exposure is mapped into a separate product matrix.
  • models.py - SupervisedProd2Vec and CausalProd2Vec as tensorflow model classes.
  • dataset_loading.py - File to load Movielens/Netflix datasets and convert to user/product matrix.
  • utils.py - Various helper methods.

Dependencies and Requirements

The code has been designed to support python 3.6+ only. The project has the following dependences and version requirements:

  • python3 - 3.6.5+
  • tensorflow - 1.9.0+
  • tensorboard - 1.9.0+
  • numpy - 1.14.5+
  • scipy - 1.1+
  • pandas - 0.22+

Training a Model

After the data has been downloaded, preprocessed and placed in the Data directory, the models can then be training simply by running python3 causal_prod2vec.py or python3 causal_prod2vec2i.py from the src directory. The various hyper-parameters of the models can be controlled via arguments detailed below.

Optional arguments

The code uses TF flags to manage the command line arguments for running the models, please note that both models have the same parameters.

Causal Embeddings for Recommendation Parameters

optional arguments:
--data_set : The dataset to load
--model_name : The name of the model used when saving (default: cp2v)
--logging_dir : Where to save tensorboard data (default: /tmp/tensorboard/)
--learning_rate : The learning rate for SGD (default: 1.0)
--l2_pen : The weight decay regularization amount (default: 0.0)
--num_epochs : The number of epochs to train for (default: 10)
--batch_size : The batch size for SGD (default: 512)
--num_steps : The number of batches after which to print information (default: 500)
--early_stopping_enabled : If to use early stopping (default: False)
--early_stopping : 'Tolerance for early stopping (# of epochs).' (default: 200)
--embedding_size : The embeddings dimension of the product and user embeddings (default: 50)
--cf_pen : The weighting for the counter-factual regularization (default: 1.0)
--cf_distance : Which distance metric to use for the counter-factual regularization (default: l1)

Cite

Please cite the associated paper for this work if you use this code:

@inproceedings{bonner2018causal,
  title={Causal embeddings for recommendation},
  author={Bonner, Stephen and Vasile, Flavian},
  booktitle={Proceedings of the 12th ACM Conference on Recommender Systems},
  pages={104--112},
  year={2018},
  organization={ACM}
}

License

Copyright CRITEO

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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].