Exemplo n.º 1
0
    def estimate(self, raw_test_dataset, measures):
        with tl.Timer() as t:
            error = self._estimate(raw_test_dataset, measures)

        print("{} algorithm predict process cost {:.3f} sec".format(
            self.__class__.__name__, t.interval))
        return error
Exemplo n.º 2
0
def estimate(test, measures, train_sparse, bu, bi, y, c, w, q, p, global_mean):
    with tl.Timer() as t:
        error = _estimate(test, measures, train_sparse, bu, bi, y, c, w, q, p,
                          global_mean)

    error = np.sqrt(np.mean(np.power(error, 2)))
    return error
Exemplo n.º 3
0
    def train(self, train_dataset):
        self.train_dataset = train_dataset

        with tl.Timer() as t:
            self._train()

        print("{} algorithm train process cost {:.3f} sec".format(
            self.__class__.__name__, t.interval))
Exemplo n.º 4
0
    def train(self, train_dataset, user_dataset=None):
        self.train_dataset = train_dataset
        self.user_dataset = user_dataset

        with tl.Timer() as t:
            self._train()
        logger.info("{} algorithm train process cost {:.3f} sec".format(
            self.__class__.__name__, t.interval))