ImportanceIndexWrapper¶
- class axtreme.data.importance_dataset.ImportanceIndexWrapper(dataset: Dataset[T_np_interface], importance_idx: int)¶
Bases:
Dataset
[tuple
[T_np_interface
,float
]]Wraps an existing dataset, returning a column/index of the item as the importance weight.
- __init__(dataset: Dataset[T_np_interface], importance_idx: int) None ¶
Wrap an existing dataset, returning part of the item as the importance weight.
- Parameters:
dataset – A dataset, where one of the columns should be used as an importance weight. - Note: Currently only datasets that return numpy or torch tensors are supported
importance_idx – the column index containing the importance weights.
Todo
Generalise this to deal with other types of dataset output (list, numpy etc).
Methods
__init__
(dataset, importance_idx)Wrap an existing dataset, returning part of the item as the importance weight.