Esempio n. 1
0
    def test8_serialization(self):
        opt = BPRMFOption().get_default_option()
        opt.num_iters = 200
        opt.d = 5
        opt.validation = aux.Option({'topk': 10})

        self._test8_serialization(BPRMF, opt)
Esempio n. 2
0
    def test05_validation(self):
        np.random.seed(7)
        opt = BPRMFOption().get_default_option()
        opt.d = 5
        opt.num_workers = 4
        opt.num_iters = 500
        opt.random_seed = 7
        opt.validation = aux.Option({'topk': 10})
        opt.tensorboard = aux.Option({'root': './tb', 'name': 'bpr'})

        self._test5_validation(BPRMF, opt, ndcg=0.03, map=0.02)
Esempio n. 3
0
 def test12_gpu_train_ml_20m(self):
     if not inited_CUBPR:
         return
     opt = BPRMFOption().get_default_option()
     opt.accelerator = True
     opt.d = 100
     opt.verify_neg = False
     opt.num_iters = 30
     opt.evaluation_period = 5
     opt.validation = aux.Option({'topk': 10})
     self._test7_train_ml_20m(BPRMF, opt)
Esempio n. 4
0
    def test11_gpu_validation(self):
        if not inited_CUBPR:
            return
        np.random.seed(7)
        opt = BPRMFOption().get_default_option()
        opt.d = 100
        opt.verify_neg = False
        opt.accelerator = True
        opt.lr = 0.01
        opt.reg_b = 10.0
        opt.num_iters = 500
        opt.evaluation_period = 50
        opt.random_seed = 777
        opt.validation = aux.Option({'topk': 10})
        opt.tensorboard = aux.Option({'root': './tb', 'name': 'bpr'})

        self._test5_validation(BPRMF, opt, ndcg=0.03, map=0.02)
Esempio n. 5
0
 def test10_fast_most_similar(self):
     opt = BPRMFOption().get_default_option()
     opt.d = 5
     opt.validation = aux.Option({'topk': 10})
     self._test10_fast_most_similar(BPRMF, opt)
Esempio n. 6
0
 def test7_train_ml_20m(self):
     opt = BPRMFOption().get_default_option()
     opt.num_workers = 8
     opt.validation = aux.Option({'topk': 10})
     self._test7_train_ml_20m(BPRMF, opt)