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

        '''
        Calculate avg error from X, Y, W
        '''

        data_num = len(Y)
        error_num = 0

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

        avg_error = float(data_num) / error_num

        return avg_error
dataset/ETHPy150Open fukuball/fuku-ml/FukuML/LogisticRegression.py/LogisticRegression.calculate_avg_error/swapped operands of `/`