hookeai.miscellaneous.pruning.pruning_dataset.prune_time_series_dataset

prune_time_series_dataset(pruning_dir, testing_types, pruning_params=None, is_remove_pruning_models=False, device_type='cpu', is_verbose=False)[source]

Prune time series data set.

Parameters:
  • pruning_dir (str) – Pruning main directory.

  • testing_types (tuple[str]) – Types of testing data sets used to assess the performance of the model trained on the pruned training data sets. Available testing types include: ‘in_distribution’, ‘out_distribution’ and ‘unused_data’.

  • pruning_params (dict, default=None) – Pruning parameters. If None, then a default set of pruning parameters is adopted.

  • is_remove_pruning_models (bool, default=False) – If True, then remove pruning iteration models when pruning iteration is complete.

  • device_type ({'cpu', 'cuda'}, default='cpu') – Type of device on which torch.Tensor is allocated.

  • is_verbose (bool, default=False) – If True, enable verbose output.

Returns:

  • pruning_params (dict) – Pruning parameters.

  • pruning_iterative_data (dict) – Pruning iterative data (item, dict) for each pruning iteration (key, str).