ncem.estimators.Estimator

class ncem.estimators.Estimator[source]

Estimator class for models.

Contains all necessary methods for data loading, model initialization, training, evaluation and prediction.

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.

img_to_patient_dict

complete_img_keys

a

h_0

h_1

size_factors

graph_covar

node_covar

domains

covar_selection

node_types

node_type_names

graph_covar_names

node_feature_names

n_features_type

n_features_standard

n_features_0

n_features_1

n_graph_covariates

n_node_covariates

n_domains

max_nodes

n_eval_nodes_per_graph

vi_model

log_transform

model_type

adj_type

cond_type

cond_depth

output_layer

steps_per_epoch

validation_steps

Methods

evaluate_any(img_keys, node_idx[, batch_size])

Evaluate model on any given data set.

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(**kwargs)

Initialize and compiles the model.

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.