def calculate_error(dataclasses: list):
    """
    calculates the error rate, = misclassified_data / total data
    :param dataclasses: a 1-dimensional list containg the orignal and predicted class of each instance in data
    :return: error rate ( <=1.0)
    """
    wrong = 0
    correct = 0

    for d in dataclasses:
            if d[0] == d[1]:
                correct += 1
            else:
                wrong += 1
    return wrong / (wrong+correct)