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.2.tar.gz (61.2 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.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cabin-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6a70cb25f12648bbaaedc665541083912e2b0c12207ada69463fdf3164c31bb3
MD5 3f0d3c1e509d3244638a971bb42d057b
BLAKE2b-256 5e740133788e9763717471f9a4407022bfeb3afc3e4cf101b9b846f3b89f677a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cabin-0.3.2.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.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for cabin-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e4e4e5c4827731fe15655c87a25ead595df3e48dc545ad6e24c1cb5b67842ebd
MD5 c2555a248ff55470407e64a880319397
BLAKE2b-256 524f0ea2b5d023032fb77b03982ca57647b769f7892459d0f74ad022613160d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cabin-0.3.2-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