-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
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
Matthews correlation should be reviewed #381
Comments
Update: We now need to use julia> cm = MLJBase.ConfusionMatrixObject([29488 13017; 12790 29753], ["0.0", "1.0"])
┌───────────────────────────┐
│ Ground Truth │
┌─────────────┼─────────────┬─────────────┤
│ Predicted │ 0.0 │ 1.0 │
├─────────────┼─────────────┼─────────────┤
│ 0.0 │ 29488 │ 13017 │
├─────────────┼─────────────┼─────────────┤
│ 1.0 │ 12790 │ 29753 │
└─────────────┴─────────────┴─────────────┘
julia> MatthewsCorrelation()(ans)
ERROR: DomainError with -5.3675251778421e18:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
Stacktrace:
[1] throw_complex_domainerror(f::Symbol, x::Float64)
@ Base.Math ./math.jl:33
[2] sqrt
@ ./math.jl:582 [inlined]
[3] sqrt(x::Int64)
@ Base.Math ./math.jl:608
[4] (::MatthewsCorrelation)(cm::MLJBase.ConfusionMatrixObject{2})
@ MLJBase ~/Dropbox/Julia7/MLJ/MLJBase/src/measures/finite.jl:357
[5] top-level scope
@ REPL[21]:1 |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here are some cases where it will fail (e.g. due to a square root over negative value)
The text was updated successfully, but these errors were encountered: