BERNN-MSMS
Batch-effect-aware representation learning and classification with an
estimator-style fit(...); predict(...) interface.
Install
pip install bernn
Quick start
from bernn import TrainAEClassifierHoldout
from bernn.config.training_config import TrainingConfig
config = TrainingConfig(
n_epochs=100,
optimize_hyperparams=False,
device="cpu",
)
model = TrainAEClassifierHoldout(config=config, log_metrics=False)
# Inductive fit: training data only.
model.fit(X_train, y_train, groups_train=batch_train)
y_pred = model.predict(X_new, groups_test=batch_new)
Read the complete BERNN usage guide for input shapes, inductive and fully transductive fitting, prediction, and hyperparameter guidance.
Important runtime contract:
groups_trainis mandatory.- If
X_validorX_testis supplied, its matching batch vector is mandatory. - BERNN hyperparameters are dataset-dependent. The examples are interface demonstrations, not universal performance-optimal defaults.
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.
Documentation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bernn-1.0.3.tar.gz
(302.0 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-1.0.3-py3-none-any.whl
(321.2 kB
view details)
File details
Details for the file bernn-1.0.3.tar.gz.
File metadata
- Download URL: bernn-1.0.3.tar.gz
- Upload date:
- Size: 302.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65c525b6bed6a3d702d70747d79ffb6a550e549320a7bbbaedd050e6ac3d8533
|
|
| MD5 |
7519fdcaae11c8737cd85a57e6794da1
|
|
| BLAKE2b-256 |
281aab32a0a9b0e1f6b0d9b079ebc67d299b778aa67920a7f21ef83d487f0521
|
File details
Details for the file bernn-1.0.3-py3-none-any.whl.
File metadata
- Download URL: bernn-1.0.3-py3-none-any.whl
- Upload date:
- Size: 321.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d8838ce61036fc61fe577804cb2f73d2de9aeb946cf0582c95ead8a059f5303
|
|
| MD5 |
dda5c3f52ca5c3e3bb3b394eaa8c5775
|
|
| BLAKE2b-256 |
a3233047e8a0159c304dd14aa19acf0222660ebacd023ac502a8acb58c15dacf
|