--- title: GroupIM keywords: fastai sidebar: home_sidebar summary: "Implementation of GroupIM recommendation model - A Mutual Information Maximization Framework for Neural Group Recommendation." description: "Implementation of GroupIM recommendation model - A Mutual Information Maximization Framework for Neural Group Recommendation." nb_path: "nbs/models/groupim.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %}

### Encoder

### Aggregator

### Discriminator

### GroupIM Model

{% raw %}

## `class` `GroupIM`[source]

> `GroupIM`(`n_items`, `user_layers`, `lambda_mi`=`0.1`, `drop_ratio`=`0.4`, `aggregator_type`=`'attention'`) :: `Module`

GroupIM framework for Group Recommendation: (a) User Preference encoding: user_preference_encoder (b) Group Aggregator: preference_aggregator (c) InfoMax Discriminator: discriminator

{% endraw %} {% raw %}
{% endraw %} {% raw %}

    model = GroupIM(n_items=10, user_layers=[5])
    model.parameters

    <bound method Module.parameters of GroupIM(
      (drop): Dropout(p=0.4, inplace=False)
      (user_preference_encoder): Encoder(
        (drop): Dropout(p=0.4, inplace=False)
        (user_preference_encoder): ModuleList(
          (0): Linear(in_features=10, out_features=5, bias=True)
        )
        (transform_layer): Linear(in_features=5, out_features=5, bias=True)
        (user_predictor): Linear(in_features=5, out_features=10, bias=False)
      )
      (preference_aggregator): AttentionAggregator(
        (mlp): Sequential(
          (0): Linear(in_features=5, out_features=5, bias=True)
          (1): ReLU()
          (2): Dropout(p=0, inplace=False)
        )
        (attention): Linear(in_features=5, out_features=1, bias=True)
        (drop): Dropout(p=0, inplace=False)
      )
      (group_predictor): Linear(in_features=5, out_features=10, bias=False)
      (discriminator): Discriminator(
        (fc_layer): Linear(in_features=5, out_features=5, bias=True)
        (bilinear_layer): Bilinear(in1_features=5, in2_features=5, out_features=1, bias=True)
        (bce_loss): BCEWithLogitsLoss()
      )
    )>

{% endraw %}

> References

> 1. https://github.com/RecoHut-Stanzas/S168471/blob/main/reports/S168471_report.ipynb2. https://arxiv.org/abs/2006.03736