Skip to content

Commit

Permalink
Fix DeepRec titles; add levels under DeepRec docs (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
anargyri authored Jun 4, 2021
1 parent 628e88f commit c76d679
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 48 deletions.
107 changes: 59 additions & 48 deletions docs/source/recommender.rst
Original file line number Diff line number Diff line change
@@ -1,89 +1,94 @@
.. _recommender:

Recommender algorithms module
*******************************
##############################

Recommender system algorithms and utilities.

Cornac
===============================
******************************

.. automodule:: reco_utils.recommender.cornac.cornac_utils
:members:

DeepRec
===============================
******************************

base_model
-------------------------------
Base model
==================
.. automodule:: reco_utils.recommender.deeprec.models.base_model
:members:

dkn
-------------------------------
DKN
==================
.. automodule:: reco_utils.recommender.deeprec.models.dkn
:members:

dkn_item2item
-------------------------------
DKN item-to-item
==================
.. automodule:: reco_utils.recommender.deeprec.models.dkn_item2item
:members:

LightGCN
==================
.. automodule:: reco_utils.recommender.deeprec.models.graphrec.lightgcn
:members:

xDeepFM
-------------------------------
==============
.. automodule:: reco_utils.recommender.deeprec.models.xDeepFM
:members:

graphrec
-------------------------------
.. automodule:: reco_utils.recommender.deeprec.models.graphrec.lightgcn
:members:
Sequential models
==================

sequential_base_model
-------------------------------
Sequential base model
---------------------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.sequential_base_model
:members:

asvd
-------------------------------
A2SVD
-------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.asvd
:members:

caser
-------------------------------
Caser
----------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.caser
:members:

gru4rec
-------------------------------
GRU4Rec
--------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.gru4rec
:members:

nextitnet
-------------------------------
NextItNet
--------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.nextitnet
:members:

rnn_cell_implement
-------------------------------
RNN Cells
------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.rnn_cell_implement
:members:

sli_rec
-------------------------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.sli_rec
:members:

sum_cells
-------------------------------
Cell for Sequential User Matrix
---------------------------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.sum_cells
:members:

sum
-------------------------------
Sequential User Matrix
-------------------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.sum
:members:

SLI Rec
-------------
.. automodule:: reco_utils.recommender.deeprec.models.sequential.sli_rec
:members:

Iterators
===========

.. automodule:: reco_utils.recommender.deeprec.io.iterator
:members:
Expand All @@ -100,20 +105,26 @@ sum
.. automodule:: reco_utils.recommender.deeprec.io.sequential_iterator
:members:

Data processing utilities
===========================

.. automodule:: reco_utils.recommender.deeprec.DataModel.ImplicitCF
:members:

Utilities
============

.. automodule:: reco_utils.recommender.deeprec.deeprec_utils
:members:

FastAI
===============================
******************************

.. automodule:: reco_utils.recommender.fastai.fastai_utils
:members:

Geoimc
===============================
******************************

.. automodule:: reco_utils.recommender.geoimc.geoimc_algorithm
:members:
Expand All @@ -128,19 +139,19 @@ Geoimc
:members:

LightFM
===============================
******************************

.. automodule:: reco_utils.recommender.lightfm.lightfm_utils
:members:

LightGBM
===============================
******************************

.. automodule:: reco_utils.recommender.lightgbm.lightgbm_utils
:members:

NCF
===============================
******************************

.. automodule:: reco_utils.recommender.ncf.dataset
:members:
Expand All @@ -149,7 +160,7 @@ NCF
:members:

Newsrec
===============================
******************************

.. automodule:: reco_utils.recommender.newsrec.io.mind_all_iterator
:members:
Expand Down Expand Up @@ -179,14 +190,14 @@ Newsrec
:members:

RBM
===============================
******************************

.. automodule:: reco_utils.recommender.rbm.rbm
:members:


RLRMC
===============================
******************************

.. automodule:: reco_utils.recommender.rlrmc.RLRMCalgorithm
:members:
Expand All @@ -199,28 +210,28 @@ RLRMC


SAR
===============================
******************************

.. automodule:: reco_utils.recommender.sar.sar_singlenode
:members:


Surprise
===============================
******************************

.. automodule:: reco_utils.recommender.surprise.surprise_utils
:members:


TF-IDF
===============================
******************************

.. automodule:: reco_utils.recommender.tfidf.tfidf_utils
:members:


VAE
===============================
******************************

.. automodule:: reco_utils.recommender.vae.multinomial_vae
:members:
Expand All @@ -230,7 +241,7 @@ VAE


Wide & Deep
===============================
******************************

.. automodule:: reco_utils.recommender.wide_deep.wide_deep_utils
:members:
2 changes: 2 additions & 0 deletions reco_utils/recommender/deeprec/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@


class BaseModel:
"""Base class for models"""

def __init__(self, hparams, iterator_creator, graph=None, seed=None):
"""Initializing the model. Create common logics which are needed by all deeprec models, such as loss function,
parameter set.
Expand Down
3 changes: 3 additions & 0 deletions reco_utils/recommender/deeprec/models/dkn_item2item.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@


class DKNItem2Item(DKN):
"""Class for item-to-item recommendations using DKN.
See https://github.com/microsoft/recommenders/blob/kdd2020_tutorial/scenarios/academic/KDD2020-tutorial/step4_run_dkn_item2item.ipynb"""

def _compute_data_loss(self):
logits = self.pred
data_loss = -1 * tf.reduce_sum(tf.math.log(logits[:, 0] + 1e-10))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@


class SequentialBaseModel(BaseModel):
"""Base class for sequential models"""

def __init__(self, hparams, iterator_creator, graph=None, seed=None):
"""Initializing the model. Create common logics which are needed by all sequential models, such as loss function,
parameter set.
Expand Down

0 comments on commit c76d679

Please sign in to comment.