binopt
===============================
.. image:: https://img.shields.io/pypi/v/binopt.svg
:target: https://pypi.python.org/pypi/binopt
.. image:: https://img.shields.io/travis/yhaddad/binopt.svg
:target: https://travis-ci.org/yhaddad/binopt
.. image:: https://readthedocs.org/projects/binopt/badge/?version=latest
:target: https://binopt.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/yhaddad/binopt/shield.svg
:target: https://pyup.io/repos/github/yhaddad/binopt/
:alt: Updates
.. image:: https://zenodo.org/badge/86721620.svg
:target: https://zenodo.org/badge/latestdoi/86721620
This package is aiming to categorize labeled data in terms of a global figure of merit. In high energy physics, categorization of collision data is done by maximizing the discovery significance. This package run on unbinned binary datasets.
installation
************
Install like any other python package::
pip install binopt --user
or::
git clone git@github.com:yhaddad/binopt.git
cd binopt/
pip install .
Getting started
***************
.. code-block:: python
sevent = 1000
bevent = 10000
X = np.concatenate((
expit(np.random.normal(+2.0, 2.0, sevent)),
expit(np.random.normal(-0.5, 2.0, bevent))
))
Y = np.concatenate((
np.ones(sevent),
np.zeros(bevent)
))
W = np.concatenate((np.ones(sevent), np.ones(bevent)))
binner = binopt.optimize_bin(
nbins=3, range=[0, 1],
drop_last_bin=True,
fix_upper=True,
fix_lower=False,
use_kde_density=True
)
opt = binner.fit(
X, Y, sample_weights=W,
method="Nelder-Mead",
breg=None, fom="AMS2"
)
print "bounds : ", opt.x
print "signif : ", binner.binned_score(opt.x)
print "Nsig : ", binner.binned_stats(opt.x)[0]
print "Nbkg : ", binner.binned_stats(opt.x)[1]
* Free software: GNU General Public License v3
* Documentation: https://binopt.readthedocs.io.
Features
--------
* TODO
Credits
---------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.1.0 (2017-04-06)
------------------
* First release on PyPI.
Metadata
Release files for binopt 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| binopt-0.2.1.tar.gz | 28.6 kB | Without provenance | Details for binopt-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| binopt-0.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for binopt-0.2.1-py2.py3-none-any.whl |
Total release size: 46.7 kB
Release files / binopt-0.2.1.tar.gz
| Download URL | binopt-0.2.1.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b897d9b333f9d58168ac62b8524ce6fb71e86169b8f0d108e7ce7171a42ce0f0
|
|
BLAKE2b-256 checksum How to use checksums |
b7b2f99d747e4c565db6ee4d40b492dcd0446679130936d4f53ba2571bd92814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / binopt-0.2.1-py2.py3-none-any.whl
| Download URL | binopt-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2efee2f3e78e57d3508d9041c4a4039160293fcc6495f40146cfe500e193c2d9
|
|
BLAKE2b-256 checksum How to use checksums |
8a3e2782b23fe6246857262b2c04e9bd5a3724c2b434e1fbe9cfb0b93ef25b49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for binopt 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.