def calculate_avg_error(self, X, Y, W):

        data_num = len(Y)
        error_num = 0

        for i in range(data_num):
            error_num = error_num + self.error_function(self.score_function(X[i], W), Y[i])

        avg_error = error_num / float(data_num)

        return avg_error
dataset/ETHPy150Open fukuball/fuku-ml/FukuML/LogisticRegression.py/BinaryClassifier.calculate_avg_error/original