Skip to main content

BRINE

This package is a Python implementation of BRINE (Blind Resolvent-based Iterative Noise Equalizer), a data-driven procedure that iteratively rescales the rows and columns of the observed matrix to equalize the average noise variance across both dimensions.

The method builds on the Dyson Equalizer, described in detail in the article The Dyson Equalizer: Adaptive Noise Stabilization for Low-Rank Signal Detection and Recovery .

The documentation is available at https://klugerlab.github.io/BRINE.

Installation

The main version of the package can be installed as

pip install brine-equalizer

The development version of the package can be installed as

pip install git+https://github.com/Klugerlab/BRINE.git

Getting started

To import the package and apply BRINE to a test matrix

from brine.examples import generate_Y_with_heteroskedastic_noise
from brine.brine import BRINE

Y = generate_Y_with_heteroskedastic_noise()
brine = BRINE(Y).run()

The BRINE result class will contain the following attributes

  • Y: The original data matrix
  • x_scale: The row scaling factors
  • y_scale: The column scaling factors
  • Y_hat: The normalized data matrix so that the variance of the error is 1
  • X_bar: The estimated signal matrix. It has rank r_hat
  • r_hat: The estimated rank of the signal matrix
  • S: The principal values of the data matrix Y
  • S_hat: The principal values of the data matrix Y_hat

The original, non-iterative DysonEqualizer is still available (brine.dyson_equalizer.DysonEqualizer) for one-shot use or comparison against BRINE.

Detailed examples are available on the Examples page.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brine_equalizer-0.2.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

brine_equalizer-0.2.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file brine_equalizer-0.2.0.tar.gz.

File metadata

  • Download URL: brine_equalizer-0.2.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for brine_equalizer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3d732fceae7257ca2446726b4fea10ecd936efce905600a934d2d5789d16de86
MD5 b474bb7570455e5bb6c03ea0be05ea60
BLAKE2b-256 410d0a5a01dc2d06beb98cf3cfe1d5daed93914f373dc9063c72e2285d4d864f

See more details on using hashes here.

Provenance

The following attestation bundles were made for brine_equalizer-0.2.0.tar.gz:

Publisher: publish_pypi_release.yml on KlugerLab/BRINE

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

File details

Details for the file brine_equalizer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: brine_equalizer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for brine_equalizer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb5312410c93eb2d403e5037725bfb7a94f728a3e7090cb2087ee722f3a07d9f
MD5 ae652a0231bf72e8a46f078af841f8e5
BLAKE2b-256 b733f2179e0632d3f5950974359b45f4295bd767a587971d59a97a1195728f60

See more details on using hashes here.

Provenance

The following attestation bundles were made for brine_equalizer-0.2.0-py3-none-any.whl:

Publisher: publish_pypi_release.yml on KlugerLab/BRINE

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page