We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
currently, we compute many metrics directly from the confusion matrix, but not Cohen's kappa:
Lighthouse.jl/src/metrics.jl
Lines 105 to 127 in 2feb223
It could clean up some of the data flow to do so. Here is an implementation.
function cohens_kappa_from_confusion_matrix(conf) p₀ = accuracy(conf) pₑ = probability_of_chance_agreement_from_confusion_matrix(conf) return (p₀ - pₑ) / (1 - ifelse(pₑ == 1, zero(pₑ), pₑ)) end function probability_of_chance_agreement_from_confusion_matrix(conf) counts_1 = dropdims(sum(conf; dims=1); dims=1) counts_2 = dropdims(sum(conf; dims=2); dims=2) n = sum(counts_1) @check n == sum(counts_2) return dot(counts_1, counts_2) / n^2 end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
currently, we compute many metrics directly from the confusion matrix, but not Cohen's kappa:
Lighthouse.jl/src/metrics.jl
Lines 105 to 127 in 2feb223
It could clean up some of the data flow to do so. Here is an implementation.
The text was updated successfully, but these errors were encountered: