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
- Full reference: OFFICIAL_DOCUMENTATION.md
- Full parameter catalog: TRAINING_PARAMETERS.md
- Minimal runnable examples notebook (4 variants): tutorials/minimal_examples.ipynb
- Optimized all-config notebook (TrainAEClassifierHoldout): tutorials/optimized_classifier_holdout_all_configs.ipynb
- Optimized all-config notebook (TrainAEThenClassifierHoldout): tutorials/optimized_ae_then_classifier_holdout_all_configs.ipynb
- Historical CLI-heavy guide: LEGACY_README.md
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.5.tar.gz
(265.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bernn-0.5.5-py3-none-any.whl
(281.7 kB
view details)
File details
Details for the file bernn-0.5.5.tar.gz.
File metadata
- Download URL: bernn-0.5.5.tar.gz
- Upload date:
- Size: 265.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61f3e29923a3590c801cae9428e1b3f4cc15b2f88870b58e2e454d321b8323a7
|
|
| MD5 |
2a059e2db575fa1c61c222340b458a32
|
|
| BLAKE2b-256 |
04312eaf2880900a49deb18ecf8428ac8da24ef30f5ac33bdde3faa669586393
|
File details
Details for the file bernn-0.5.5-py3-none-any.whl.
File metadata
- Download URL: bernn-0.5.5-py3-none-any.whl
- Upload date:
- Size: 281.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e969747de10389a0ff76eaf1fca969f6bf37982c9905b8edf5004baf64f5dbc
|
|
| MD5 |
cdc267aadae2d8ea7c87ceb241c08f8f
|
|
| BLAKE2b-256 |
ea46089762111bbdbf3ba7da4798eaf31b3927fcc7718a00d90465fd46b2d532
|