MCPcopy Create free account

hub / github.com/Navidfoumani/ConvTran / functions

Functions89 in github.com/Navidfoumani/ConvTran

↓ 3 callersMethod__init__
(self, config, num_classes)
Models/model.py:87
↓ 3 callersFunctionextract_subsequences
(X_data, y_data, window_size=30, stride=1, norm=False)
Dataset/classifier_tools.py:86
↓ 2 callersMethod__init__
(self, emb_size, num_heads, dropout)
Models/Attention.py:7
↓ 2 callersMethod__init__
(self, d_model, dropout=0.1, max_len=1024, scale_factor=1.0)
Models/AbsolutePositionalEncoding.py:23
↓ 2 callersMethod__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, degenerated_to_sgd=True)
Models/optimizers.py:17
↓ 2 callersMethod__setstate__
(self, state)
Models/optimizers.py:36
↓ 2 callersMethodevaluate
(self, epoch_num=None, keep_all=True)
Training.py:37
↓ 2 callersFunctionmean_std_transform
(train_data, mean, std)
Dataset/load_UEA_data.py:184
↓ 2 callersFunctionprint_confusion_matrix
Print confusion matrix as text to terminal
Models/analysis.py:192
↓ 2 callersFunctionprocess_ts_data
This is a function to process the data, i.e. convert dataframe to numpy array :param X: :param normalise: :return:
Dataset/load_UEA_data.py:154
↓ 1 callersFunctionData_Loader
(config)
utils.py:74
↓ 1 callersFunctionData_Verifier
(config)
utils.py:82
↓ 1 callersFunctionDownloader
(file_url, problem)
utils.py:99
↓ 1 callersFunctionInitialization
(config)
utils.py:64
↓ 1 callersFunctionSetup
Input: args: arguments object from argparse Returns: config: configuration dictionary
utils.py:17
↓ 1 callersMethod__init__
(self, model, dataloader, device, loss_module, optimizer=None, l2_reg=None, print_interval=10,
Training.py:20
↓ 1 callersFunctionacc_top_k
Accuracy when allowing for correct class being in the top k predictions. Arguments: predictions: (N_samples, k) array of top class indice
Models/analysis.py:19
↓ 1 callersMethodanalyze_classification
For an array of label predictions and the respective true labels, shows confusion matrix, accuracy, recall, precision etc: Input:
Models/analysis.py:411
↓ 1 callersFunctioncount_parameters
(model)
Models/model.py:7
↓ 1 callersFunctioncreate_dirs
Input: dirs: a list of directories to create, in case these directories are not found Returns: exit_code: 0 if success, -1 if
utils.py:47
↓ 1 callersFunctionfill_missing
(x: np.array, max_len: int, vary_len: str = "suffix-noise", normalise: bool = True)
Dataset/load_UEA_data.py:97
↓ 1 callersMethodforward
(self, x)
Models/model.py:12
↓ 1 callersMethodgenerate_classification_report
Returns a string of a report for given metric arrays (array length equals the number of classes). Called internally by `analyze_class
Models/analysis.py:276
↓ 1 callersMethodget_avg_prec_recall
Get average recall and precision, using class frequencies as weights, optionally excluding specified classes
Models/analysis.py:342
↓ 1 callersFunctionget_loss_module
()
Models/loss.py:6
↓ 1 callersFunctionget_optimizer
(name)
Models/optimizers.py:6
↓ 1 callersFunctionl2_reg_loss
Returns the squared L2 norm of output layer of given model
Models/loss.py:10
↓ 1 callersFunctionlimiter
Wraps a list of metric functions, i.e precison or recall, by ingoring predictions under the specified threshold for a specific class.
Models/analysis.py:81
↓ 1 callersFunctionload_model
(model, model_path, optimizer=None, resume=False, change_output=False, lr=None, lr_step=None, l
Models/utils.py:70
↓ 1 callersFunctionmean_std
(train_data)
Dataset/load_UEA_data.py:174
↓ 1 callersFunctionmodel_factory
(config)
Models/model.py:16
↓ 1 callersFunctionprepare_inputs_deep_learning
(train_inputs, test_inputs, window_len=40, stride=20, val_size=1, random_stat
Dataset/classifier_tools.py:11
↓ 1 callersFunctionsave_model
(path, epoch, model, optimizer=None)
Models/utils.py:38
↓ 1 callersMethodskew
(self, QEr)
Models/Attention.py:144
↓ 1 callersFunctionsplit_dataset
(data, label, validation_ratio)
Dataset/load_UEA_data.py:87
↓ 1 callersMethodstep
(self, closure=None)
Models/optimizers.py:39
↓ 1 callersMethodtrain_epoch
(self, epoch_num=None)
Training.py:34
↓ 1 callersFunctiontrain_runner
(config, model, trainer, val_evaluator, path)
Training.py:213
↓ 1 callersFunctionvalidate
Run an evaluation on the validation set while logging metrics, and handle outcome
Training.py:171
Method__call__
(self, current_valid_loss, epoch, model, optimizer, criterion, path)
Models/utils.py:60
Method__getitem__
(self, ind)
utils.py:145
Method__init__
(self, *args, **kwargs)
Training.py:57
Method__init__
(self, data, label)
utils.py:139
Method__init__
(self, maxcharlength=35, plot=False, print_conf_mat=False, output_filepath=None)
Models/analysis.py:210
Method__init__
(self, best_valid_loss=float('inf'))
Models/utils.py:57
Method__init__
(self, console=True)
Models/utils.py:295
Method__init__
(self, emb_size, num_heads, seq_len, dropout)
Models/Attention.py:46
Method__init__
(self, emb_size, num_heads, seq_len, dropout)
Models/Attention.py:98
Method__init__
(self, d_model, dropout=0.1, max_len=1024, scale_factor=1.0)
Models/AbsolutePositionalEncoding.py:62
Method__init__
(self, d_model, dropout=0.1, max_len=1024)
Models/AbsolutePositionalEncoding.py:87
Method__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, degenerated_to_sgd=True)
Models/optimizers.py:112
Method__init__
(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, warmup=0)
Models/optimizers.py:190
Method__init__
(self, config, num_classes)
Models/model.py:27
Method__init__
(self, config, num_classes)
Models/model.py:154
Method__init__
(self, in_channels, out_channels, kernel_size,
Models/model.py:222
Method__len__
(self)
utils.py:157
Method__setstate__
(self, state)
Models/optimizers.py:127
Method__setstate__
(self, state)
Models/optimizers.py:204
Functionaccuracy
A simple accuracy calculator, which can ignore labels specified in a list
Models/analysis.py:45
Methoddyn_print
Print things to stdout on one line, refreshing it dynamically
Models/utils.py:303
Methodevaluate
(self, epoch_num=None, keep_all=True)
Training.py:114
Methodforward
(self, inp, target)
Models/loss.py:24
Methodforward
(self, x)
Models/Attention.py:19
Methodforward
(self, x)
Models/Attention.py:68
Methodforward
(self, x)
Models/Attention.py:119
Methodforward
r"""Inputs of forward function Args: x: the sequence fed to the positional encoder model (required). Shape: x:
Models/AbsolutePositionalEncoding.py:35
Methodforward
r"""Inputs of forward function Args: x: the sequence fed to the positional encoder model (required). Shape: x:
Models/AbsolutePositionalEncoding.py:74
Methodforward
r"""Inputs of forward function Args: x: the sequence fed to the positional encoder model (required). Shape: x:
Models/AbsolutePositionalEncoding.py:101
Methodforward
(self, x)
Models/model.py:67
Methodforward
(self, x)
Models/model.py:133
Methodforward
(self, x)
Models/model.py:201
Methodforward
(self, x)
Models/model.py:242
Functionload
(config)
Dataset/load_UEA_data.py:13
Functionload
(config)
Dataset/load_segment_data.py:9
Functionload_activity
(file_path, data_type, norm=True, verbose=1)
Dataset/data_loader.py:55
Functionload_ford_data
(file_path, data_type, norm=True, verbose=1)
Dataset/data_loader.py:99
Functionload_segmentation_data
(file_path, data_type, norm=True, verbose=1)
Dataset/data_loader.py:10
Methodprec_rec_histogram
Make a histogram with the distribution of classes with respect to precision and recall
Models/analysis.py:368
Functionprec_rec_parametrized_by_thr
Returns an array showing for a specified class of interest, how precision and recall change as a function of the score threshold (parameter).
Models/analysis.py:94
Functionprecision
Returns precision for the specified class index
Models/analysis.py:61
Methodprint_callback
(self, i_batch, metrics, prefix='')
Training.py:40
Functionreadable_time
Convert a float measuring time difference in seconds into a tuple of (hours, minutes, seconds)
Models/utils.py:309
Functionrecall
Returns recall for the specified class index
Models/analysis.py:71
Methodshow_acc_top_k_improvement
Show how accuracy improves when considering the event of the correct label being among the top k predictions as a successful prediction
Models/analysis.py:236
Methodstep
(self, closure=None)
Models/optimizers.py:130
Methodstep
(self, closure=None)
Models/optimizers.py:207
Functiontimer
Print the runtime of the decorated function
Models/utils.py:25
Methodtrain_epoch
(self, epoch_num=None)
Training.py:69
Functionwrapper_timer
(*args, **kwargs)
Models/utils.py:28