Пример #1
0
    def evaluate(self):
        self.Y_predicted = self.model.predict(self.X_test)
        self.Y_predicted = np.argmax(self.Y_predicted, axis=1)
        self.Y_predicted = [
            self.labels_dict_rev[int(i)] for i in list(self.Y_predicted)
        ]

        self.Y_test = np.argmax(self.Y_test, axis=1)
        self.Y_test = [self.labels_dict_rev[int(i)] for i in list(self.Y_test)]

        self.accuracy, self.precision, self.recall, self.f1score = BasicFunctions.getMetrics(
            self.Y_test, self.Y_predicted, self.labels)
Пример #2
0
    def evaluate(self):
        self.Y_predicted = self.classifier.predict(self.X_test)

        self.accuracy, self.precision, self.recall, self.f1score = BasicFunctions.getMetrics(
            self.Y_test, self.Y_predicted, self.labels)