You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not aware that unbound type parameters matter for performance in method dispatch. Can you explain a bit more about that, or point out a reference?
We might want to throw an error if P is not real - but as a type check, not to address performance. So we could replace the first call with
call(::AUC, ŷ::ArrMissing{UnivariateFinite{S,V,R,P}}, y) where {S,V,R,P<:Real} =_auc(P, ŷ, y)
or, the equivalent
call(::AUC, ŷ::ArrMissing{UnivariateFinite{<:Any,<:Any,<:Any}}, y) where P<:Real=_auc(P, ŷ, y)
It looks like the second method definition you refer to is trying to address something better solved by implementing an promote_rule for the UnivariateFinite type (defined at CategoricalDistributions.jl). Here's the issue:
So the the first method call will not catch this case.
What the last line in the code snippet above "should" be is UnivariateFinite{Multiclass{2}, String, UInt8, Float64}, which a promote_rule "lifting" promotion in P will do, right?
Take a look at these two method definitions: https://github.com/JuliaAI/MLJBase.jl/blob/dev/src/measures/probabilistic.jl#L91-L96
The second method seems faulty in several ways:
ArrMissing{UnivariateFinite}
, is parameterized with an abstract type. usually one would do something like this instead:ArrMissing{<:UnivariateFinite}
The text was updated successfully, but these errors were encountered: