b0d50f3cccf54888ed59292f3213bea9b2f15dcf,spotlight/factorization/explicit.py,ExplicitFactorizationModel,fit,#ExplicitFactorizationModel#Any#Any#,100
Before Change
self._num_items) = (interactions.num_users,
interactions.num_items)
self._net = gpu(
BilinearNet(self._num_users,
self._num_items,
self._embedding_dim,
sparse=self._sparse),
self._use_cuda
)
if self._optimizer_func is None:
self._optimizer = optim.Adam(
self._net.parameters(),
weight_decay=self._l2,
lr=self._learning_rate
)
else:
self._optimizer = self._optimizer_func(self._net.parameters())
if self._loss == "regression":
loss_fnc = regression_loss
elif self._loss == "poisson":
After Change
user_ids = interactions.user_ids.astype(np.int64)
item_ids = interactions.item_ids.astype(np.int64)
if not self._initialized:
self._initialize(interactions)
self._check_input(user_ids, item_ids)
for epoch_num in range(self._n_iter):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: maciejkula/spotlight
Commit Name: b0d50f3cccf54888ed59292f3213bea9b2f15dcf
Time: 2017-07-31
Author: ethanrosenthal@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: fit
Project Name: maciejkula/spotlight
Commit Name: b0d50f3cccf54888ed59292f3213bea9b2f15dcf
Time: 2017-07-31
Author: ethanrosenthal@gmail.com
File Name: spotlight/factorization/implicit.py
Class Name: ImplicitFactorizationModel
Method Name: fit
Project Name: maciejkula/spotlight
Commit Name: 7a82079d10379287ba4e6e42e21b5b3ce8f541bc
Time: 2017-07-13
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: fit