Skip to main content

Batch Effect Removal Neural Networks for Tandem Mass Spectrometry

Project description

BERNN-MSMS

Minimal README for quick usage.

Longer historical content is kept in LEGACY_README.md.

Install

pip install bernn

Basic usage

from bernn import TrainAEClassifierHoldout

trainer_cls = TrainAEClassifierHoldout
trainer = trainer_cls(config=bernn_config, log_metrics=True, keep_models=False)

# Train and predict in one call
preds_encoded = trainer.fit_predict(
    X_train,
    y_train,
    X_test=X_test,
    y_test=y_test,
    groups_train=batches_train,
    groups_test=batches_test,
    cross_validation=False,
    cross_test=False,
)

# Decode predictions back to original labels
preds = trainer.predict(X_test)

Important runtime contract:

  • groups_train is mandatory.
  • If X_test is provided, groups_test is mandatory.

Important parameters

Focus on these first:

  • optimize_hyperparams: enable/disable Ax optimization.
  • n_trials: number of optimization trials.
  • fixed_hyperparams: force values and remove them from search.
  • n_repeats: number of holdout repeats.
  • n_layers, layer1: classifier depth and width seed.
  • dloss: domain loss mode.
  • warmup, n_epochs: core training schedule.
  • device: cpu/cuda target.
  • scaler, bs: preprocessing and batch size.

Official documentation

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

bernn-0.5.1.tar.gz (268.9 kB view details)

Uploaded Source

Built Distribution

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

bernn-0.5.1-py3-none-any.whl (285.7 kB view details)

Uploaded Python 3

File details

Details for the file bernn-0.5.1.tar.gz.

File metadata

  • Download URL: bernn-0.5.1.tar.gz
  • Upload date:
  • Size: 268.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for bernn-0.5.1.tar.gz
Algorithm Hash digest
SHA256 b81fc20c65ced46e4e16c857ca61253ac94dd455dfc87e8d6432bf58ba0072fc
MD5 40af0fa94d76e68f2de637147c08d68d
BLAKE2b-256 a5caf6e4f6eaed828f9d07fe63a104f3ecb5bdcea6a891029447ebf8d0211a3b

See more details on using hashes here.

File details

Details for the file bernn-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: bernn-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 285.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for bernn-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9757a11e8c59ccbc463f5e1a145bdefb65736a5ea9b7d5b06de823bf8dcbcec7
MD5 d22a46fc24103adf71fe227cc8cd045c
BLAKE2b-256 fd7df29d5142139d1ec471742f3e0143643fea6b39351be47c5c35d09e2fa7d6

See more details on using hashes here.

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