fde2f66676f960782c993f7148927c4a4197ab10,spotlight/factorization/explicit.py,ExplicitFactorizationModel,fit,#ExplicitFactorizationModel#,85

Before Change


        if self._optimizer is None:
            self._optimizer = optim.Adam(self._net.parameters())

        if self._loss == "pointwise":
            loss_fnc = pointwise_loss
        elif self._loss == "bpr":
            loss_fnc = bpr_loss
        elif self._loss == "hinge":
            loss_fnc = hinge_loss

        for epoch_num in range(self._n_iter):

            users, items, ratings = shuffle(*(interactions.row,
                                              interactions.col,

After Change


        
        

        user_ids = interactions.user_ids.astype(np.int64)
        item_ids = interactions.item_ids.astype(np.int64)

        (self._num_users,
         self._num_items) = (interactions.num_users,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: maciejkula/spotlight
Commit Name: fde2f66676f960782c993f7148927c4a4197ab10
Time: 2017-06-27
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: fit


Project Name: openai/gym
Commit Name: cee92691ad858952b4ed46c08cad6cc682868d22
Time: 2019-03-24
Author: zuoxingdong@users.noreply.github.com
File Name: gym/spaces/box.py
Class Name: Box
Method Name: __init__


Project Name: pytorch/tnt
Commit Name: ba256835a4f33d9139a70b6440c3223123132bc8
Time: 2017-08-24
Author: swetha.tanamala@gmail.com
File Name: torchnet/meter/confusionmeter.py
Class Name: ConfusionMeter
Method Name: add