Metadata-Version: 2.1
Name: sweights
Version: 1.4.1
Summary: Tools for producing sweights using classic methods or custom orthogonal weight functions (COWs) and for correcting covariance matrices for weighted data fits.
Author-email: Matthew Kenzie <matthew.kenzie@cern.ch>, Hans Dembinski <hans.dembinski@gmail.com>
License: MIT
Project-URL: repositoy, https://github.com/sweights/sweights
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.1
Requires-Dist: scipy>=1.5.1
Requires-Dist: iminuit
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: coverage[toml]; extra == "test"
Requires-Dist: matplotlib; extra == "test"
Provides-Extra: doc
Requires-Dist: ipython; extra == "doc"
Requires-Dist: nbsphinx; extra == "doc"
Requires-Dist: sphinx_rtd_theme; extra == "doc"
Requires-Dist: boost-histogram; extra == "doc"
Requires-Dist: matplotlib; extra == "doc"
Requires-Dist: uproot; extra == "doc"
Requires-Dist: pandas; extra == "doc"

# sweights

[![](https://img.shields.io/pypi/v/sweights.svg)](https://pypi.org/project/sweights/)
[![](https://github.com/sweights/sweights/actions/workflows/docs.yml/badge.svg?branch=main)](https://sweights.github.io/sweights)
[![](https://img.shields.io/badge/arXiv-2112.04574-b31b1b.svg)](https://arxiv.org/abs/2112.04574)

```bash
pip install sweights
```

We provide several tools for projecting component weights *sWeights* in a control variable(s) using a discriminating variable(s). What we call *sWeights* is the traditional *sPlot* method (we think that sPlot is a misnomer and hence call it sWeights), but also the new Custom Orthogonal Weight functions (COWs). If you use this package, please cite our methods as:

[Dembinski, H., Kenzie, M., Langenbruch, C. and Schmelling, M., Custom Orthogonal Weight functions (COWs) for event classification, *NIMA* **1040** (2022) 167270](https://www.sciencedirect.com/science/article/pii/S0168900222006076?via%3Dihub)

If you cannot access this paper for free, checkout the preprint, [arXiv:2112.04574](https://arxiv.org/abs/2112.04574).

We also provide tools for correcting the covariance matrix of fits to weighted data, described in section IV of our paper and in more detail in [Langenbruch, arXiv:1911.01303](https://arxiv.org/abs/1911.01303).

## Documentation

You can find [our documentation here](https://sweights.github.io/sweights).
