Skip to main content

Package for learning Cuts As Biases In Networks

Project description

cabin

cabin is a set of simple neural network classes (and custom loss functions) designed to learn selection cuts for tabular data using gradient descent. A full description of the cabin approach to learning cuts is in:

Learning Selection Cuts with Gradients

The OneToOneLinear class models pass/fail requirements on input features as a sigmoid activation applied to a linear transformation of the input features. The "cut" can then be extracted from the weight and bias of the linear transformation, which puts the optimal separation point between signal and background at 0. The output of the network modeling the full set of cuts on input features is the product of all sigmoid-activated linear transformations of the inputs. The output is bounded in the range [0,1] and resembles a normal classification network result, with events failing any one cut having output scores near zero, and events passing all cuts having scores near 1. A loss function (loss_fn) included in the cabin library permits a OneToOneLinear cut network to be tuned to optimize background rejection for a specified target signal efficiency.

cabin network illustration

The EfficiencyScanNetwork class is composed of a collection of OneToOneLinear objects that targets a range of signal efficiencies. Another loss function (effic_loss_fn) can be used to ensure that cuts vary smoothly across different efficiency working points.

The libraries were developed with high-energy physics applications in mind, but the approach can be applied to any binary classification problem.

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

cabin-0.3.3.tar.gz (62.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cabin-0.3.3-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file cabin-0.3.3.tar.gz.

File metadata

  • Download URL: cabin-0.3.3.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cabin-0.3.3.tar.gz
Algorithm Hash digest
SHA256 4f56580a9267e8e85190d2687b1d06f55fd47fe85521fa94f834e35ea7e35736
MD5 728836cc8b542c614df5016991520efb
BLAKE2b-256 b74884e5c496ed49fc35c881a99193cc984a3a93e50d42517c3964c5cfa72146

See more details on using hashes here.

Provenance

The following attestation bundles were made for cabin-0.3.3.tar.gz:

Publisher: ci.yml on scipp-atlas/cabin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cabin-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: cabin-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cabin-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff39281798e56da9f0515a0ba28d66309cfdbac96884f059bbf636f71226926
MD5 6594ac90e0e3c77dd0feb2cd7c7a68f9
BLAKE2b-256 ec9cf50908ce936fcfa7388ab4070a848b6e1e996dbfba571ce9a349deba5648

See more details on using hashes here.

Provenance

The following attestation bundles were made for cabin-0.3.3-py3-none-any.whl:

Publisher: ci.yml on scipp-atlas/cabin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page