API#

Model#

model.MILClassifier(adata, sample_key[, ...])

MultiMIL MIL prediction model.

Module#

module.MILClassifierTorch([z_dim, dropout, ...])

MultiMIL's MIL classification module.

Neural network components#

nn.MLP(n_input, n_output[, n_layers, ...])

A helper class to build blocks of fully-connected, normalization, dropout and activation layers.

nn.Aggregator([n_input, scoring, attn_dim, ...])

A helper class to build custom aggregators depending on the scoring function passed.

Utilities#

utils.get_sample_representations(adata, ...)

Get sample representations from cell-level representations.

utils.score_top_cells(adata[, top_fraction, ...])

Score top cells based on cell attention weights.

utils.setup_ordinal_regression(adata, ...)

Setup ordinal regression.

utils.plt_plot_losses(history, loss_names, save)

Plot losses.