A package for analysis of rare particle decays with machine-learning algorithms
Project description
raredecay
This package consists of several tools for the event selection of particle decays, mostly built on machine learning techniques. It contains:
a data-container holding data, weights, labels and more and implemented root-to-python data conversion as well as plots and KFold-data splitting
reweighting tools from the hep_ml-repository wrapped in a KFolding structure and with metrics to evaluate the reweighting quality
classifier optimization tools for hyper-parameters as well as feature selection involving a backward-elimination
an output handler which makes it easy to add text as well as figures into your code and automatically save them to a file
… and more
HowTo examples
To get an idea of the package, have a look at the howto notebooks: HTML version or the IPython Notebooks
Minimal example
Want to test whether your reweighting did overfit? Use train_similar:
import raredecay as rd
mc_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=0)
real_data = rd.data.HEPDataStorage(df, weights=*pd.Series weights*, target=1)
score = rd.score.train_similar(mc_data, real_data, old_mc_weights=1 *or whatever weights the mc had before*)
Getting started right now
If you want it the easy, fast way, have a look at the Ready-to-use scripts. All you need to do is to have a look at every “TODO” task and probably change them. Then you can run the script without the need of coding at all.
Documentation and API
The API as well as the documentation: Documentation
Setup and installation
PyPI
The package with all extras requires root_numpy as well as rootpy (and therefore a ROOT installation with python-bindings) to be installed on your system. If that is not the case, some functions won’t work.
Recommended installation (requires ROOT):
pip install raredecay[all] --process-dependency-links
Anaconda
Easiest way: use conda to install everything (except of the rep, which has to be upgraded with pip for some functionalities)
conda install raredecay -c mayou36
To make sure you can convert ROOT-NTuples, use
pip install raredecay[root] # *use raredecay\[root\] in a zsh-console*
or, instead of root/additionally (comma separated) reweight or reweight for the specific functionalities.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file raredecay-2.1.0.tar.gz
.
File metadata
- Download URL: raredecay-2.1.0.tar.gz
- Upload date:
- Size: 92.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.4.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89cc6b4bda86b3aa64ce526f3cdcc4f756f8fc713c7d1273a19434ee49bbb475 |
|
MD5 | 6c84e3b591b0451c7eff3d651268460c |
|
BLAKE2b-256 | 93dbbc4ce274e850ba8c38c296fc14e78a7e9d2248ead60cea2fbf2aaf56d0f0 |
File details
Details for the file raredecay-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: raredecay-2.1.0-py3-none-any.whl
- Upload date:
- Size: 114.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.4.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf8aecbe23174812774e3bb399c145f7579f1a4c1893c3fca095e69675e936f6 |
|
MD5 | e09175ea2ab9afe16c44906f4e074fb9 |
|
BLAKE2b-256 | c33658ebf85434d10959a51ddf549d7953ebf4da36df97a9d3c23572442740c4 |