Skip to main content

BERNN-MSMS

Batch-effect-aware representation learning and classification with an estimator-style fit(...); predict(...) interface.

Install

pip install bernn

Basic usage

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_train is mandatory.
  • If X_valid or X_test is 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.
  • num_workers: PyTorch DataLoader subprocesses; defaults to 0.

Documentation

Metadata

Release files for bernn 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bernn 1.0.6
File Size Uploaded Provenance Actions
bernn-1.0.6.tar.gz 302.7 kB Without provenance Details for bernn-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bernn 1.0.6
File Interpreter ABI Platform Actions
bernn-1.0.6-py3-none-any.whl Python 3 none any Details for bernn-1.0.6-py3-none-any.whl

Total release size: 624.6 kB

Release files / bernn-1.0.6.tar.gz

Download URL bernn-1.0.6.tar.gz
Size 302.7 kB
Tags Source
SHA-256 checksum
How to use checksums
069e1a9d10b42fcbfd514ae7e335fc049c8b5287fd50ddbf3d35d4feb43caac0
BLAKE2b-256 checksum
How to use checksums
b92a9a0a07de232c0dfc40a6471e8a8e60b8595fd75b288235b9afcfeae2c0ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / bernn-1.0.6-py3-none-any.whl

Download URL bernn-1.0.6-py3-none-any.whl
Size 321.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
974edffeb9ffd385ac71d1c4768510d2ee004410826e4cfd8c29c4f541792df3
BLAKE2b-256 checksum
How to use checksums
1a4552bc79cfb3ec224d1977dd89190e8c3a0391949037a2c497b0c4773437eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for bernn 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files No provenance

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