ncem.estimators.EstimatorCVAEncem

class ncem.estimators.EstimatorCVAEncem(cond_type: str = 'gcn', use_type_cond: bool = True, log_transform: bool = False)[source]

Estimator class for conditional variational autoencoder NCEM models. Subclass of EstimatorGraph.

Attributes

img_keys_all

Return all image keys.

nodes_idx_all

Return all node indices.

nodes_idx_eval

alias of Dict[str, list]

nodes_idx_test

alias of Dict[str, list]

nodes_idx_train

alias of Dict[str, list]

patient_ids_bytarget

Return patient identifiers by target.

patient_ids_unique

Return unique patient identifiers.

Methods

evaluate_any(img_keys, node_idx[, batch_size])

Evaluate model on any given data set.

evaluate_any_posterior_sampling(img_keys, …)

Evaluate model based on resampled dataset for posterior resampling.

evaluate_per_node_type([batch_size])

Evaluate model for each node type seperately.

get_data(data_origin, data_path, radius[, …])

Get data used in estimator classes.

init_model([optimizer, learning_rate, …])

Initialize a ModelCVAEncem object.

predict([batch_size])

Return observed labels and full predictions (including scale model) grouped exactly as in nodes_idx_test.

pretrain_decoder([decoder_epochs, patience, …])

Pre-train decoder model.

split_data_given(img_keys_test, …)

Split data by given partition.

split_data_node(test_split, validation_split)

Split nodes randomly into partitions.

split_data_target_cell(target_cell, …[, seed])

Split nodes randomly into partitions.

train([epochs, epochs_warmup, …])

Train model.

train_aggressive([aggressive_enc_patience, …])

Train model aggressive.

train_normal([epochs, patience, …])

Train model normal.