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.4.2.tar.gz (274.8 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.4.2-py3-none-any.whl (291.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bernn-0.4.2.tar.gz
  • Upload date:
  • Size: 274.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for bernn-0.4.2.tar.gz
Algorithm Hash digest
SHA256 12ffe3b03836188d9420eeb9578c98843e03913d42320b2b78f4a1291cb4f841
MD5 437382088d25273af738ace1c18ee0e7
BLAKE2b-256 d847f8663e30c014625b21cee1a81b20c71ca4bcd515aee4ff9d3c863385db77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bernn-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 291.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for bernn-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b038d76d935df481d70ed9855f52c4393b7a2d70e00be4231d16886901e5b6c3
MD5 41654bb623d1c57b4c6baf084110ad82
BLAKE2b-256 0c7803f57a5652bd9da62b31bfaa0a9455dc93db19ce65950d5a128f968998ef

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