CardamomOT.inference.proliferations =================================== .. py:module:: CardamomOT.inference.proliferations .. autoapi-nested-parse:: 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 ------- .. autoapisummary:: CardamomOT.inference.proliferations.ProliferationMLP Functions --------- .. autoapisummary:: CardamomOT.inference.proliferations.train_proliferation_mlp Module Contents --------------- .. py:class:: ProliferationMLP(n_proteins: int, hidden_size: int = 64) Bases: :py:obj:`torch.nn.Module` Two-hidden-layer MLP: protein levels → net proliferation rate R. .. py:method:: predict(prot: numpy.ndarray) -> numpy.ndarray prot: (N, n_proteins) → R values (N,). .. py:function:: 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. :param prot: :type prot: (N_total, G_tot) protein trajectory array (including stimulus dims). :param R_opt: :type R_opt: (N_total,) net proliferation rates from OT coupling marginals. :param ns: :type ns: number of stimulus dimensions to skip in prot.