This repository contains code for training machine learning models to classify events detected by a ground-based atmospheric Cherenkov gamma telescope. The goal is to discriminate between gamma ray signals and background noise caused by cosmic ray showers based on the characteristics of the shower images captured by the telescope.
The dataset used for training and evaluation is generated by a Monte Carlo program, CORSIKA, which simulates the registration of high-energy gamma particles in the Cherenkov telescope. It includes features such as fLength, fWidth, fSize, etc., extracted from the shower images. Each event is labeled as either signal (gamma ray) or background (cosmic ray).
Four machine learning models are implemented for this classification task:
-
Support Vector Machine (SVM): A supervised learning algorithm that separates the classes in the feature space using a hyperplane. The SVM model is trained on the provided dataset to classify events into signal and background categories.
-
k-Nearest Neighbors (KNN): A simple and effective algorithm that classifies an unknown sample based on the majority class of its k nearest neighbors in the feature space. The KNN classifier is trained on the provided dataset to classify events into signal and background categories.
-
Naive Bayes: A probabilistic classifier that applies Bayes' theorem with the "naive" assumption of independence between features. The Naive Bayes classifier is trained on the provided dataset to classify events into signal and background categories.
-
Feedforward Neural Network: A customizable neural network architecture is implemented using TensorFlow/Keras. This neural network allows customization of parameters such as the number of neurons, activation functions, and dropout rates. It is trained on the same dataset to classify events into signal and background categories.
To use the code in this repository, follow these steps:
-
Clone the repository to your local machine:
-
Run the Jupyter notebooks or Python scripts to train and evaluate the SVM, KNN, Naive Bayes, and neural network models.
Contributions to this project are welcome! If you have any ideas for improvement or would like to report a bug, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.