buddi.models.buddi4#

Functions

Input([shape, batch_size, dtype, sparse, ...])

Used to instantiate a Keras tensor.

build_buddi4(n_x, n_y, n_labels, n_stims, ...)

Builds the BUDDI model.

build_encoder_branch(inputs, hidden_dim, z_dim)

Defines a single hidden layer encoder that outputs two encodings: mu and log_var.

build_latent_space_classifier(inputs, ...[, ...])

A simple classifier that predicts from the latent space representation.

build_prop_estimator(inputs, num_classes[, ...])

Defines a classifier network that estimates cell type proportion from the input.

build_semi_supervised_decoder(...[, ...])

Defines a decoder network that takes in both supervised and unsupervised inputs.

classifier_loss_generator([weight, loss_fn, ...])

Classifier loss function generator.

fit_buddi4(supervised_model, ...[, epochs, ...])

Train buddi4 model with supervised and unsupervised datasets,

kl_loss_generator([beta, agg_fn])

KL divergence loss function generator.

reconstr_loss_generator([weight, ...])

Reconstruction loss function generator.

unsupervised_dummy_loss_fn(y_true, y_pred)

Dummy loss function for unsupervised branch proportion estimator.

Classes

Adam([learning_rate, beta_1, beta_2, ...])

Optimizer that implements the Adam algorithm.

CategoricalCrossentropy([from_logits, ...])

Computes the crossentropy loss between the labels and predictions.

Concatenate(*args, **kwargs)

Concatenates a list of inputs.

MeanSquaredError([reduction, name, dtype])

Computes the mean of squares of errors between labels and predictions.

Model(*args, **kwargs)

A model grouping layers into an object with training/inference features.

ReparameterizationLayer(*args, **kwargs)

Custom layer that applies the reparameterization trick.

tqdm(*_, **__)

Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested.