This repository contains code for training and evaluating a custom ResNet15 model for classifying particle types based on their hit energy and time matrices. The particles are classified into two categories: Electrons and Photons. The code includes data generation, preprocessing, model definition, training with cross-validation, and evaluation.
- Overview
- Requirements
- Data Generation
- Data Preprocessing
- Model Definition
- Training and Validation
- Testing
- How to Use
- Results
- License
The code is designed to:
- Generate synthetic data representing hit energy and time matrices for Electrons and Photons.
- Preprocess and augment the data.
- Define and train a custom ResNet15 model with L1 regularization.
- Perform k-fold cross-validation to evaluate the model's performance.
- Evaluate the model on a separate test dataset and generate predictions for random test cases.
To run this code, you need:
- Python 3.x
- PyTorch
- NumPy
- scikit-learn
- Matplotlib
You can install the required libraries using pip:
pip install torch numpy scikit-learn matplotlib