Skip to content

Commit

Permalink
Updated recommenders example (apache#13041)
Browse files Browse the repository at this point in the history
* initial modification recommender

* Recommender updates

* fix notebooks

* Update README.md

* trigger build

* Update README.md

* Retrigger build
  • Loading branch information
ThomasDelteil authored and KellenSunderland committed Nov 26, 2018
1 parent afa4c3a commit 8b3fa78
Show file tree
Hide file tree
Showing 13 changed files with 3,857 additions and 1,305 deletions.
38 changes: 10 additions & 28 deletions example/recommenders/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,28 @@
# Recommender Systems with Sparse Data
# Recommender Systems


This directory has a set of examples of how to build various kinds of recommender systems
using MXNet. It also includes a set of tools for using sparse data.
using MXNet. The sparsity of user / item data is handled through the embedding layers that accept
indices as input rather than one-hot encoded vectors.


## Examples

The examples are driven by notebook files.

* [Matrix Factorization part 1: linear and non-linear models](demo1-MF.ipynb)
* [Matrix Factorization part 2: overfitting and deep ResNet](demo1-MF2-fancy.ipynb)
* [Binary classification with negative sampling](demo2-binary.ipynb)
* [Deep Structured Semantic Model (DSSM) for content-based recommendations](demo3-dssm.ipynb)

## Prerequisite

The plotting functionality in the above examples requires ```0.12.2``` version of ```Bokeh``` package. The plotting functionality throws following error when a different Bokeh version is loaded.
```bash
ValueError: PATCH-DOC message requires at least one event
```

## Re-usable code
* [Matrix Factorization: linear and non-linear models](demo1-MF.ipynb)
* [Deep Structured Semantic Model (DSSM) for content-based recommendations](demo2-dssm.ipynb)

These examples use and demonstrate a number of layers and other tools that can be used outside of these examples. They are all available from the [`recotools`](recotools.py) package.

### Negative Sampling

* `NegativeSamplingDataIter`

### Loss Layers

* `CosineLoss`
* `CrossEntropyLoss`

### Sparse Data Projection layers

* `SparseRandomProjection`
* `SparseBagOfWordProjection`
* A previous version of this example had an example of negative sampling. For example of negative sampling, please refer to:
[Gluon NLP Sampled Block](https://github.com/dmlc/gluon-nlp/blob/master/gluonnlp/model/sampled_block.py)


## Acknowledgements

Thanks to [xlvector](https://github.com/xlvector/) for the first Matrix Factorization example
that provided the basis for these examples.

[MovieLens](http://grouplens.org/datasets/movielens/) data from [GroupLens](http://grouplens.org/).

141 changes: 0 additions & 141 deletions example/recommenders/crossentropy.py

This file was deleted.

Loading

0 comments on commit 8b3fa78

Please sign in to comment.