Skip to content
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

Class to create metrics from predict #17

Closed
ediboc opened this issue May 30, 2023 · 3 comments · Fixed by #18
Closed

Class to create metrics from predict #17

ediboc opened this issue May 30, 2023 · 3 comments · Fixed by #18

Comments

@ediboc
Copy link
Collaborator

ediboc commented May 30, 2023

Make a Class to create metrics like f1, confusion matrix, ROC AUC from predict results

@pablet
Copy link
Member

pablet commented Jun 16, 2023

Finally, instead of a class of metrics, create an evaluate method. With the VisionClassifier instantiated, it is possible to obtain the metric indicated by the user. Example:

vc = VisionClassifier(
   model_name="vit_huge_patch14_224_in21k",
   num_classes=2,
   task="single_label",
)

vc.evaluate(data, "accuracy")

@jorloplaz
Copy link

jorloplaz commented Jun 21, 2023

Which metrics would you support for .evaluate()? Note that as in sklearn, for a classifier we could have metrics that would return a numeric array based on pure predictions from predict() (e.g., accuracy), but we could also have probabilistic metrics that would require a predict_proba() beforehand.

And things become even trickier for multiclass problems...

@pablet
Copy link
Member

pablet commented Jun 21, 2023

Right now we are going to standardise to metrics that accept y_true and y_pred as pure predictions 1D array. However, we are open to suggestions, what metrics that require probabilities would you like to see?

@pablet pablet linked a pull request Jun 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants