-
Notifications
You must be signed in to change notification settings - Fork 94
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
Multi-class classification implementation #329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MortenHolmRep and @Peterandresen12,
Thanks for this PR! It would make a nice addition to the repo. 🙂
I have added a few suggestions and comments that center on the fact that, currently, the proposed task and loss function hard-code assumption about the number of classes, and the PIDs of the particles being classified. We should try to be more general if we want to implement generic multi-class classification.
I will look into a rework tonight, based on the suggestions 👍 |
device inheritance Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
loss function renaming Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
description reformulation Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
trimming description Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
description reformulation Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
dynamical multiclass classification Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Hi @MortenHolmRep, Thanks for the quick iteration! :) I have added comments to a few threads. Please let me know if there's anything else you'd like to discuss there. Otherwise, feel free to re-request a review once you think the code in the PR is ready for a second look. :) |
Thanks for your review @asogaard! I have added some comments for now. The suggestion you made I'll have to test later today. |
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Regarding the failing unit test: As far as I can tell, the fact that we change the assertion logic regarding |
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
unused import Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
Co-authored-by: Andreas Søgaard <andreas.sogaard@gmail.com>
I have added a script called "train_classification_model_without_configs.py" that follows the old structure and a new script called "train_classification_model.py" that should adhere to the new structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MortenHolmRep,
I think this looks great! If it runs as expected, I am all for merging this. There is still the problem of the failing unit test that needs to be resolved. I think it is just a matter of deleting this block as it no longer represents expected behaviour. :)
Well done! |
Multi-class classification implementation
Implementation of multi-class classification predictions as per #111 , where the new operational structure would imply
Raw Data -> [noise, muon, neutrino]
In the current implementation, this could also easily be expanded to
Raw Data -> [noise, muon, nu_e, nu_mu, nu_tau]
But a two-step classification, first on
[noise, muon, neutrino]
and then a second classification, with a neutrino-specific task, training with the identified neutrinos on[nu_e, nu_mu, nu_tau]
is probably preferred for neutrino classifications.comments on an approach or alteration to this multi-class classification implementation are welcome.
Training with the task using
examples/train_model.py
works with the following alterations, where the target arepid
:and for the results
Implementation by @Peterandresen12 and I