Skip to content

Commit

Permalink
[tests] IRR-NCDM
Browse files Browse the repository at this point in the history
  • Loading branch information
tswsxk committed Jul 1, 2021
1 parent 2bc3a34 commit 4bcebd3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/irr/test_ncdm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding: utf-8
# 2021/7/1 @ tongshiwei

from EduCDM.IRR import NCDM


def test_irr_dina(train_data, test_data, params, tmp_path):
cdm = NCDM(params.user_num, params.item_num, params.knowledge_num)
cdm.train(train_data, test_data=test_data, epoch=2)
filepath = tmp_path / "irr.params"
cdm.save(filepath)
cdm.load(filepath)


def test_irt(zero_train_data, test_data, params, tmp_path):
cdm = NCDM(params.user_num, params.item_num, params.knowledge_num, zeta=0)
cdm.train(zero_train_data, test_data=test_data, epoch=2)
filepath = tmp_path / "irr.params"
cdm.save(filepath)
cdm.load(filepath)

0 comments on commit 4bcebd3

Please sign in to comment.