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

Enable the usage of the focal loss function #144

Open
nietootein opened this issue Jun 29, 2022 · 1 comment
Open

Enable the usage of the focal loss function #144

nietootein opened this issue Jun 29, 2022 · 1 comment

Comments

@nietootein
Copy link
Member

Focal loss may be useful to our classification use case, where there is a significant imbalance between classes. We should try to implement it as a selectable loss function and benchmark its impact on classification.

@TjarkMiener
Copy link
Member

I just came across this lately. In the keras loss API, this focal loss is available under CategoricalFocalCrossentropy. Also for the regression tasks we might want to explore different loss functions. I think quite promising is the LogCosh. That one is more robust to outliers than mean absolute error, which might be very helpful during training. I guess our outliers are proton-like (diffuse) gammas which we later discard anyway for the (high-level) analysis. So we probably want our loss function to ignore those predictions which should disturb the learning. Just food for thoughts but we should move back to allow the user to pass different keras built-in loss functions and run some experiments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants