BiomedSciAI / fuse-med-ml

A python framework accelerating ML based discovery in the medical field by encouraging code reuse. Batteries included :)
Apache License 2.0
134 stars 34 forks source link

Enable classification metrics to use logits and class indicators #215

Closed afoncubierta closed 1 year ago

afoncubierta commented 1 year ago

The current implementation of the classification metrics expects class labels as integers. The user might want to use a model that outputs logits to estimate the class.

In this case, it would be possible to spare the user from tuning the model, by enabling the metric computation to use logits or class scores directly. This can be easily done by using type_of_target function from sklearn and if the result is some sort of continous value, apply an argmax function.

An alternative is that the user will implement the argmax or even explore the operating point of the model, but the proposed solution would be the default in case the user takes no action.