from sklearn.metrics import accuracy_score, mean_squared_error


def classification_metric(prediction, target):
    prediction = list(map(lambda x: x.argmax(), prediction))
    target = list(map(lambda x: x.argmax(), target))
    return accuracy_score(target, prediction)


def regression_metric(prediction, target):
    return mean_squared_error(target, prediction)


def binary_classification_metric(prediction, target):
    return accuracy_score(target, prediction)

7398d02052e750dc2fe66d4790094f2106783a11
<mask token>

<mask token>


def classification_metric(prediction, target):
    prediction = list(map(lambda x: x.argmax(), prediction))
    target = list(map(lambda x: x.argmax(), target))
    return accuracy_score(target, prediction)


<mask token>

<mask token>


def classification_metric(prediction, target):
    prediction = list(map(lambda x: x.argmax(), prediction))
    target = list(map(lambda x: x.argmax(), target))
    return accuracy_score(target, prediction)


def regression_metric(prediction, target):
    return mean_squared_error(target, prediction)


<mask token>

<mask token>


def classification_metric(prediction, target):
    prediction = list(map(lambda x: x.argmax(), prediction))
    target = list(map(lambda x: x.argmax(), target))
    return accuracy_score(target, prediction)


def regression_metric(prediction, target):
    return mean_squared_error(target, prediction)


def binary_classification_metric(prediction, target):
    return accuracy_score(target, prediction)

from sklearn.metrics import accuracy_score, mean_squared_error


def classification_metric(prediction, target):
    prediction = list(map(lambda x: x.argmax(), prediction))
    target = list(map(lambda x: x.argmax(), target))
    return accuracy_score(target, prediction)


def regression_metric(prediction, target):
    return mean_squared_error(target, prediction)


def binary_classification_metric(prediction, target):
    return accuracy_score(target, prediction)
