MCPcopy Create free account

hub / github.com/AI4HealthUOL/ecg-fm-benchmarking / functions

Functions823 in github.com/AI4HealthUOL/ecg-fm-benchmarking

↓ 1 callersFunctioncreate_head1d
Model head that takes `nf` features, runs through `lin_ftrs`, and about `nc` classes; added bn and act here
code/clinical_ts/models/ecg_foundation_models/ecgfm_ked.py:38
↓ 1 callersMethoddefault_state
(self, *batch_shape, device=None)
code/clinical_ts/ts/s4_modules/s42.py:1168
↓ 1 callersMethoddefault_state
(self, *batch_shape, device=None)
code/clinical_ts/models/s42.py:1166
↓ 1 callersMethoddouble_length
(self)
code/clinical_ts/ts/s4_modules/s42.py:747
↓ 1 callersMethoddouble_length
(self)
code/clinical_ts/models/s42.py:746
↓ 1 callersFunctionecg_preprocessing
(ecg_signal, band_pass=[0.05, 47])
code/clinical_ts/models/ecg_foundation_models/hubert_ecg/utils.py:18
↓ 1 callersFunctionensure_list
(x, expected_len)
mimic_preprocessing.py:493
↓ 1 callersFunctioneval_sensitivity_specificity
(targs, preds, metric, targets, greater_than=True)
code/clinical_ts/metric/base.py:286
↓ 1 callersMethodexport_features
(self, output_path, module="ts_encoder.predictor", as_memmap=False, aggregate_strides=True)
code/clinical_ts/template_model.py:737
↓ 1 callersFunctionextract_comments
(file_path)
code/clinical_ts/utils/ecg_utils.py:155
↓ 1 callersMethodfix_init_weight
(self)
code/clinical_ts/models/ecg_foundation_models/ecg_jepa/ecg_jepa.py:266
↓ 1 callersMethodfix_init_weight
(self)
code/clinical_ts/models/ecg_foundation_models/ecg_jepa/ecg_jepa.py:465
↓ 1 callersFunctionfix_threshold
(targs, preds, metric, targets, greater_than=True)
code/clinical_ts/metric/base.py:260
↓ 1 callersMethodforward
(self, x, **kwargs)
code/main_lite_base.py:79
↓ 1 callersMethodforward
(self, x, **kwargs)
code/main_lite.py:72
↓ 1 callersMethodforward_decoder
(self, x, ids_restore)
code/clinical_ts/models/ecg_foundation_models/st_mem/mtae.py:219
↓ 1 callersMethodforward_decoder
(self, x, ids_restore)
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:231
↓ 1 callersMethodforward_encoder
x: (batch_size, num_leads, seq_len)
code/clinical_ts/models/ecg_foundation_models/st_mem/mtae.py:190
↓ 1 callersMethodforward_encoder
x: (batch_size, num_leads, seq_len)
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:194
↓ 1 callersMethodforward_encoding
(self, series)
code/clinical_ts/models/ecg_foundation_models/st_mem/encoder/vit.py:218
↓ 1 callersMethodforward_encoding
(self, series)
code/clinical_ts/models/ecg_foundation_models/st_mem/encoder/st_mem_vit.py:93
↓ 1 callersMethodforward_loss
series: (batch_size, num_leads, seq_len) pred: (batch_size, n, patch_size * num_leads) mask: (batch_size, n), 0 is keep, 1 is
code/clinical_ts/models/ecg_foundation_models/st_mem/mtae.py:245
↓ 1 callersMethodforward_loss
series: (batch_size, num_leads, seq_len) pred: (batch_size, num_leads, n, patch_size) mask: (batch_size, num_leads, n), 0 is
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:263
↓ 1 callersFunctionforward_params_list
(N)
code/extensions/cauchy/tune_cauchy.py:10
↓ 1 callersFunctionfreeze_bn_stats
(model, freeze=True)
code/clinical_ts/utils/callbacks.py:98
↓ 1 callersFunctiongenerate_data
(batch_size, N, L, symmetric=True, device='cuda')
code/extensions/cauchy/test_cauchy.py:11
↓ 1 callersFunctiongenerate_data
(batch_size, N, L, symmetric=True, device='cuda')
code/extensions/cauchy/benchmark_cauchy_tune.py:10
↓ 1 callersFunctiongenerate_data
(batch_size, N, L, symmetric=True, device='cuda')
code/extensions/cauchy/benchmark_cauchy.py:12
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
code/clinical_ts/models/ecg_foundation_models/ecg_jepa/ecg_jepa.py:30
↓ 1 callersFunctionget_git_revision_short_hash
()
code/main_lite.py:52
↓ 1 callersFunctionget_initializer
(name, activation=None)
code/clinical_ts/ts/s4_modules/s42.py:126
↓ 1 callersFunctionget_initializer
(name, activation=None)
code/clinical_ts/models/s42.py:125
↓ 1 callersMethodget_keys
returns metrics keys in the order they will later be returned by _eval
code/clinical_ts/metric/base.py:58
↓ 1 callersFunctionget_logger
Initializes multi-GPU-friendly python logger.
code/clinical_ts/ts/s4_modules/s42.py:23
↓ 1 callersFunctionget_logger
Initializes multi-GPU-friendly python logger.
code/clinical_ts/models/s42.py:22
↓ 1 callersMethodget_logits
Computes cosine similary between transfomer pooled output, referred to as input representation, and look-up embedding matrix, that is a dense represen
code/clinical_ts/models/ecg_foundation_models/hubert_ecg/hubert_ecg_classification.py:77
↓ 1 callersFunctionget_macro_auroc
(targs, preds, classes)
mimic_evaluation.py:26
↓ 1 callersFunctionget_mae
(targs, preds, metrics=["mae"], target_names=None)
mimic_evaluation.py:30
↓ 1 callersMethodget_model_transforms
(self, tfms_lst)
code/main_lite_base.py:67
↓ 1 callersMethodget_model_transforms
should return model-specific transforms to bring data from its standard format into the format expected by the foundation model Note: before T
code/main_lite.py:363
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:240
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:263
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:284
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:306
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:351
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:571
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/template_modules.py:669
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/utils/heads.py:22
↓ 1 callersMethodget_output_shape
(self)
code/clinical_ts/ts/head.py:345
↓ 1 callersMethodget_params
(self, modules=False)
code/clinical_ts/template_model.py:618
↓ 1 callersMethodget_params
return param (groups), modules=True is only used for freezing
code/clinical_ts/template_model.py:906
↓ 1 callersMethodget_sample_length
(self,idx)
code/clinical_ts/data/time_series_dataset.py:405
↓ 1 callersFunctionget_slurm_job_id
Get the SLURM job ID from environment variables.
code/clinical_ts/utils/basic_io.py:20
↓ 1 callersFunctionget_stratified_kfolds
(labels,n_splits,random_state)
code/clinical_ts/utils/ecg_utils.py:41
↓ 1 callersFunctionget_work_dir
Get the next available work directory with incremented version number.
code/clinical_ts/utils/basic_io.py:30
↓ 1 callersFunctioninit_cnn
(m)
code/clinical_ts/models/xresnet1d.py:123
↓ 1 callersFunctioninit_cnn
(m)
code/clinical_ts/models/ecg_foundation_models/ecgfm_ked.py:173
↓ 1 callersFunctioninit_default
Initialize `m` weights with `func` and set `bias` to 0.
code/clinical_ts/models/xresnet1d.py:17
↓ 1 callersFunctioninit_default
Initialize `m` weights with `func` and set `bias` to 0.
code/clinical_ts/models/ecg_foundation_models/ecgfm_ked.py:81
↓ 1 callersMethodinitialize_weights
(self)
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:116
↓ 1 callersMethodis_multi_prediction
(self)
code/clinical_ts/template_model.py:168
↓ 1 callersFunctionload_encoder
(ckpt_dir)
code/clinical_ts/models/ecg_foundation_models/ecg_jepa/ecg_jepa_utils.py:7
↓ 1 callersFunctionload_model_from_config
Load and instantiate a model from a full-path YAML config. Args: config_name: Full path to YAML config file (including .yaml ext
code/clinical_ts/models/ecg_foundation_models/ecg_cpc/basic_io.py:21
↓ 1 callersMethodload_state_dict
(self, state_dict, strict=True)
code/main_lite_base.py:448
↓ 1 callersMethodload_state_dict
(self, state_dict, strict=True)
code/main_lite.py:337
↓ 1 callersFunctionmistatus
(mi,acute,catheterized)
code/clinical_ts/utils/ecg_utils.py:251
↓ 1 callersFunctionnplr
Return w, p, q, V, B such that (w - p q^*, B) is unitarily equivalent to the original HiPPO A, B by the matrix V i.e. A = V[w - p q^*]V^*, B
code/clinical_ts/ts/s4_modules/s42.py:420
↓ 1 callersFunctionnplr
Return w, p, q, V, B such that (w - p q^*, B) is unitarily equivalent to the original HiPPO A, B by the matrix V i.e. A = V[w - p q^*]V^*, B
code/clinical_ts/models/s42.py:419
↓ 1 callersMethodpatchify
series: (batch_size, num_leads, seq_len) x: (batch_size, n, patch_size * num_leads)
code/clinical_ts/models/ecg_foundation_models/st_mem/mtae.py:145
↓ 1 callersMethodpatchify
series: (batch_size, num_leads, seq_len) x: (batch_size, num_leads, n, patch_size)
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:149
↓ 1 callersFunctionprepare_kernel_string
(kernel_string, params)
code/extensions/cauchy/tuner.py:34
↓ 1 callersFunctionprepare_metadata
(partition,data_path)
code/clinical_ts/utils/ecg_utils.py:1515
↓ 1 callersFunctionprepare_mimic_ecg
finetune_dataset e.g. mimic_all_all_all_all_2000_5A -mimic_{subsettrain}_{labelsettrain}_{subsettest}_{labelsettest}_{mincnt}_{digits} where _{di
code/clinical_ts/utils/mimic_ecg_preprocessing.py:24
↓ 1 callersFunctionprocess_ecg_file
(row, data_path, target_root, channel_stoi, target_fs, channels)
code/clinical_ts/utils/ecg_utils.py:1150
↓ 1 callersFunctionprocess_single
(i,df)
code/clinical_ts/utils/ecg_utils.py:936
↓ 1 callersMethodrandom_masking
Perform per-sample random masking by per-sample shuffling. Per-sample shuffling is done by argsort random noise. x: (batch_si
code/clinical_ts/models/ecg_foundation_models/st_mem/mtae.py:163
↓ 1 callersMethodrandom_masking
Perform per-sample random masking by per-sample shuffling. Per-sample shuffling is done by argsort random noise. x: (batch_si
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:167
↓ 1 callersFunctionrank_correction
Return low-rank matrix L such that A + L is normal
code/clinical_ts/ts/s4_modules/s42.py:386
↓ 1 callersFunctionrank_correction
Return low-rank matrix L such that A + L is normal
code/clinical_ts/models/s42.py:385
↓ 1 callersFunctionread_file
return the contents of the file named filename or None if file not found
code/extensions/cauchy/tuner.py:21
↓ 1 callersFunctionreformat_as_memmap
(df, target_filename, fs, channel_itos=None, fs_annotation=None, channel_itos_annotation=None, data_folder=Non
code/clinical_ts/data/time_series_dataset_utils.py:397
↓ 1 callersFunctionrun
(hparams: FullConfig)
code/pretrain.py:68
↓ 1 callersFunctionsanity_check
Linear classifier should not change any weights other than the linear layer. This sanity check asserts nothing wrong happens (e.g., BN stats
code/clinical_ts/utils/callbacks.py:107
↓ 1 callersFunctionscale_column
(col_values, scaler)
mimic_preprocessing.py:454
↓ 1 callersFunctionscaling
(seq, smooth=1e-8)
code/clinical_ts/models/ecg_foundation_models/hubert_ecg/utils.py:15
↓ 1 callersFunctionselect_labels
(labels, min_cnt=10)
code/clinical_ts/utils/ecg_utils.py:130
↓ 1 callersFunctionsensitivity
(y_true, y_pred)
code/clinical_ts/metric/base.py:257
↓ 1 callersMethodset_target_encoder
(self)
code/clinical_ts/models/ecg_foundation_models/ecg_jepa/ecg_jepa.py:570
↓ 1 callersFunctionset_up_tuning_temp_dir
(params: dict, source_files, extension_dir, verbose=True)
code/extensions/cauchy/tuner.py:116
↓ 1 callersMethodsetup_dataset
(self, target_folder, df_mapped, lbl_itos, mean, std)
code/main_lite_base.py:266
↓ 1 callersMethodsetup_dataset
dataset specific modification in derived classes
code/main_lite.py:131
↓ 1 callersFunctionsingle_eval_prrc
evaluate instance-wise scores for a single sample and a single threshold
code/clinical_ts/utils/eval_utils_cafa.py:109
↓ 1 callersFunctionspecificity
(y_true, y_pred)
code/clinical_ts/metric/base.py:254
↓ 1 callersFunctionst_mem_vit_base_dec256d4b
(**kwargs)
code/clinical_ts/models/ecg_foundation_models/st_mem/st_mem.py:315
↓ 1 callersMethodstep
Step one time step as a recurrent model. Intended to be used during validation. u: (B H) state: (B H N) Returns: output (B H
code/clinical_ts/ts/s4_modules/s42.py:1149
↓ 1 callersMethodstep
Step one time step as a recurrent model. Intended to be used during validation. u: (B H) state: (B H N) Returns: output (B H
code/clinical_ts/models/s42.py:1147
↓ 1 callersFunctionstore_attr
Store params named in comma-separated `nms` from calling context into attrs in `self`
code/clinical_ts/models/ecg_foundation_models/ecgfm_ked.py:68
↓ 1 callersFunctionstratified_subsets
partitions df into n subsets (with fractions specified by subset_ratios) keeping the label distribution in col_label intact also respecting patie
code/clinical_ts/utils/stratify.py:58
↓ 1 callersFunctiontransition
A, B transition matrices for different measures measure: the type of measure legt - Legendre (translated) legs - Legendre (scaled)
code/clinical_ts/ts/s4_modules/s42.py:322
↓ 1 callersFunctiontransition
A, B transition matrices for different measures measure: the type of measure legt - Legendre (translated) legs - Legendre (scaled)
code/clinical_ts/models/s42.py:321
← previousnext →201–300 of 823, ranked by callers