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
Exemple #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
    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))
Exemple #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))