from sklearn import metrics


def precision(y, y_pred) -> float:
    return float(metrics.precision_score(y, y_pred))


def recall(y, y_pred) -> float:
    return float(metrics.recall_score(y, y_pred))


def accuracy(y, y_pred) -> float:
    return float(metrics.accuracy_score(y, y_pred))


def f1(y, y_pred) -> float:
    return float(metrics.f1_score(y, y_pred))


def mcc(y, y_pred) -> float:
    return float(metrics.matthews_corrcoef(y, y_pred))


def cohen_kappa(y, y_pred) -> float:
    return float(metrics.cohen_kappa_score(y, y_pred))
