CardamomOT.inference.proliferations

Proliferation rate inference utilities for CardamomOT.

Provides a lightweight MLP that maps protein levels to a net proliferation rate R = b - d (birth minus death), estimated from the row marginals of the optimal-transport coupling computed during trajectory inference.

Classes

ProliferationMLP

Two-hidden-layer MLP: protein levels → net proliferation rate R.

Functions

train_proliferation_mlp(→ ProliferationMLP)

Train a ProliferationMLP on (prot[:, ns:], R_opt) pairs.

Module Contents

class CardamomOT.inference.proliferations.ProliferationMLP(n_proteins: int, hidden_size: int = 64)

Bases: torch.nn.Module

Two-hidden-layer MLP: protein levels → net proliferation rate R.

predict(prot: numpy.ndarray) numpy.ndarray

prot: (N, n_proteins) → R values (N,).

CardamomOT.inference.proliferations.train_proliferation_mlp(prot: numpy.ndarray, R_opt: numpy.ndarray, ns: int = 1, hidden_size: int = 64, n_epochs: int = 300, lr: float = 0.001, batch_size: int = 256, verb: bool = True) ProliferationMLP

Train a ProliferationMLP on (prot[:, ns:], R_opt) pairs.

Parameters:
  • prot ((N_total, G_tot) protein trajectory array (including stimulus dims).)

  • R_opt ((N_total,) net proliferation rates from OT coupling marginals.)

  • ns (number of stimulus dimensions to skip in prot.)