Coder Social home page Coder Social logo

software_and_computing_exam's Introduction

Software_and_Computing_Exam

The project contains:

  • 2 folders, each with 3 .root files with the datasets (signal, background and real (mixed) data):
    • the trees folder contains the 3 data samples with all the events;
    • the reducedtrees folder contains 3 reduced data samples with just the first 10000 events for each leaf, useful to try the program in just few minutes
  • another folder containing an example of just a few output results by the different macros (All the training outputs and evaluation are not present here);
  • 2 macros for the Machine Learning methods' performances evaluation and comparison:
    • one with PYTHON: here a linear classifier is evaluated on the data sample;
    • the other with TMVA based methods: a comparison between 4 methods is done (CutsGA, Fisher, NnBnn and BDT);
  • a TMVA macro which analyses the inserted data with the chosen method
  • a main macro that let the user decide which of the previous macros wants to open and which machine learning method wants to use to analize data. On the base of the answers this macro opens the different files;
  • the macro that was used to cut the datasets in order to have just the leaves of the trees that I needed and reduce the samples;
  • a .yml file containing the environment that I used to run the python scripts.

All the files can be downloaded from the GitHub repository at the link:

https://github.com/SofiaStrazzi/Software_and_Computing_Exam.git

Project description

Program used to analyse events containing Higgs bosons decaying to b quark pairs in the LHC data: the program shows an evaluation of a linear estimator in the PYTHON file and compares the performances of 4 machine learning techniques with TMVA methods. An output file with all the results is created and a ROC curve. On the base of the results, the user can decide which method is the best one and use it to analyse the data.

Three different datasets are used to test the program:

  • Higgs bosons (higgsevents.root) which contains the signal events;
  • Top quark pairs (ttbarevents.root) which contains background events;
  • Data (dataevents.root) containing both signal and background events that I want to analyze.

The three datasets are extracted from bigger files: they have been cutted through the macro copyleaves in order to obtain smaller files with just the information that I needed.

All the trees are called EventsTree.

The programs gives in as output:

  • a trainingevents folder containing the TMVA weights for the different methods;
  • a LinearClassifier_Output folder containing the linear estimator output information;
  • a .root file called MLtmva_comparison_output that contains output of the comparison of the 4 different methods (CutsGA, Fisher, NnBnn and BDT);
  • a .root file called MLtmva_analysis_output that contains the output of the real data analysis with the chosen method;
  • During the different steps the program asks the user if he wants to see some plots in real time containing for example some of the distributions or the ROC curves or open the GUI with some resulst of training and test.

Version used and required packages

The program was tested with the version of python 3.8.10 and the version of root 6.20.08.

The TMVA package is required (https://root.cern/manual/tmva/)

For the python script some packages are required:

  • tensorflow (version 2.4.0)
  • pandas
  • uproot
  • numpy
  • matplotlib
  • sklearn

The python script is used in a given environment. A .yml file containing the used environment is present between the project files.

How to run the code

Analysis can be generated starting from the script analysis.py, giving on the terminal (inside the environment) the command:

"python3 analysis.py"

and then answering to the questions. On the base of the answers the script will run MLpython.py or MLtmva.C and then MLtmva_analysis.C

software_and_computing_exam's People

Contributors

sofiastrazzi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.