Package 'mccr'

Title: The Matthews Correlation Coefficient
Description: The Matthews correlation coefficient (MCC) score is calculated (Matthews BW (1975) <DOI:10.1016/0005-2795(75)90109-9>).
Authors: Hitoshi Iuchi
Maintainer: Hitoshi Iuchi <[email protected]>
License: MIT + file LICENSE
Version: 0.4.4
Built: 2026-05-17 05:25:16 UTC
Source: https://github.com/cran/mccr

Help Index


Calculate the Matthews correlation coefficient (MCC) score

Description

Calculate the Matthews correlation coefficient (MCC) score

Usage

mccr(act, pred)

Arguments

act

actual values (vector), 1 (positive), or 0 (negative)

pred

predict values (vector), 1 (positive), or 0 (negative)

Value

MCC score

Examples

set.seed(18)
act <- abs(round(rnorm(100))) %% 2
pred <- abs(round(rnorm(100))) %% 2
mccr(act, pred)