Skip to main content

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_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.

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)

Uploaded Source

Built Distribution

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

bernn-1.0.3-py3-none-any.whl (321.2 kB view details)

Uploaded Python 3

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

Hashes for bernn-1.0.3.tar.gz
Algorithm Hash digest
SHA256 65c525b6bed6a3d702d70747d79ffb6a550e549320a7bbbaedd050e6ac3d8533
MD5 7519fdcaae11c8737cd85a57e6794da1
BLAKE2b-256 281aab32a0a9b0e1f6b0d9b079ebc67d299b778aa67920a7f21ef83d487f0521

See more details on using hashes here.

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

Hashes for bernn-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d8838ce61036fc61fe577804cb2f73d2de9aeb946cf0582c95ead8a059f5303
MD5 dda5c3f52ca5c3e3bb3b394eaa8c5775
BLAKE2b-256 a3233047e8a0159c304dd14aa19acf0222660ebacd023ac502a8acb58c15dacf

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

This release

1.0.3 This release

2 files

1.0.2

2 files

0.6.28

2 files

0.6.27

2 files

0.6.26

2 files

0.6.25

2 files

0.6.24

2 files

0.6.23

2 files

0.6.22

2 files

0.6.21

2 files

0.6.20

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.12

2 files

0.4.10

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.21

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

1 file

0.1.3

2 files

0.1.2

2 files

0.1.1

1 file

0.1.0

1 file

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