def score(self, X, y):
        loss_funct = self.loss_funct
        if loss_funct is None:
            loss_funct = self._num_mistakes

        outputs = self.predict_proba(X)
        targets = self._onehot(self._enc.transform(y))
        mistakes = loss_funct(outputs, targets)
        return - float(mistakes) / len(y) + 1
dataset/ETHPy150Open dnouri/nolearn/nolearn/dbn.py/DBN.score/original