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 think its time to revisit this package again. It has been around for a while now, which also means that some of the design aspects are overdue for a bit of cleanup.
Separate MLMetrics.AvgMode from new LossFunctions.AggMode
About: Separate AvgMode from AggMode
Basically I realised that what we call AvgMode right now is used to describe two orthogonal problems.
LossFunctions.jl: It is used to specify if a loss should be
computed element-wise with AvgMode.None (i.e. same shape as outputs), or
aggregated somehow to one number (AvgMode.Sum, AvgMode.Mean), or
aggregated somehow to one number but with observation weights (AvgMode.WeightedSum, AvgMode.WeightedMean, etc),
aggregated somehow to a vector (one number per observation) (e.g. AvgMode.Sum + ObsDim.Last)
MLMetrics.jl: It is used to specify if an aggregated metric (precision, recall, etc) should be
computed per class with AvgMode.None (i.e. one number per class), or
micro averaged to one number (with AvgMode.Micro), or
macro averaged to one number (with AvgMode.Macro)
Both of these scenarios should also support weighting observations and weighting classes. Now in the first case for LossFunctions.jl, we do class re-weighting using the loss itself, and observation weighting using the special AvgMode. I am not yet sure how to address this for the second case, but the interface should be similar
With all this in mind it makes sense to split the two problems into an AggMode for the first and an AvgMode for the later. While AggMode would be placed here in LossFunctions, the new AvgMode would be placed in MLMetrics
The text was updated successfully, but these errors were encountered:
Thank you @Evizero for sharing the roadmap. From what I understand most items have been accomplished, and only the items regarding benchmarking and label encodings are missing. The latter one is somewhat outdated with the efforts in CategoricalArrays, and so we are only left with infrastructural issues. I will close this issue, and update the roadmap moving forward.
I think its time to revisit this package again. It has been around for a while now, which also means that some of the design aspects are overdue for a bit of cleanup.
Ref
(done in Port documentation from Readthedocs to docstrings + Documenter #100)AvgMode
toAggMode
(aggregate mode) Rename "Average Modes" #91 (done in Rename AvgMode to AggMode #104)MLMetrics.AvgMode
from newLossFunctions.AggMode
About: Separate AvgMode from AggMode
Basically I realised that what we call
AvgMode
right now is used to describe two orthogonal problems.LossFunctions.jl: It is used to specify if a loss should be
AvgMode.None
(i.e. same shape asoutputs
), orAvgMode.Sum
,AvgMode.Mean
), orAvgMode.WeightedSum
,AvgMode.WeightedMean
, etc),AvgMode.Sum
+ObsDim.Last
)MLMetrics.jl: It is used to specify if an aggregated metric (precision, recall, etc) should be
AvgMode.None
(i.e. one number per class), orAvgMode.Micro
), orAvgMode.Macro
)Both of these scenarios should also support weighting observations and weighting classes. Now in the first case for LossFunctions.jl, we do class re-weighting using the loss itself, and observation weighting using the special AvgMode. I am not yet sure how to address this for the second case, but the interface should be similar
With all this in mind it makes sense to split the two problems into an
AggMode
for the first and anAvgMode
for the later. WhileAggMode
would be placed here in LossFunctions, the newAvgMode
would be placed inMLMetrics
The text was updated successfully, but these errors were encountered: