dqa.tasks.ml.LabelsByRanges#

class dqa.tasks.ml.LabelsByRanges(main_dataset: str | List[str], label_dataset: str, time_input: str, label_output: str, default_label: int = -1, start_name: str = 'Start', end_name: str = 'End', label_name: str = 'Label', keep_labels_dataset: bool = False, **kwargs)#

Creates a label metadata key from a table in another dataset specifying a range for each label.

Parameters:
  • main_dataset (str or list of str) – Dataset(s) that will contain the generated label output.

  • label_dataset (str) – The dataset containing the table with the label ranges.

  • time_input (str) – The metadata key indicating the time in the input that should be compared to the ranges.

  • label_output (str) – Name of the data row for the label result.

  • default_label (int, default=-1) – All output labels that are not defined by any range will have this value.

  • start_name (str, default='Start') – Name of the data row specifying the start of the range in the label table.

  • end_name (str, default='End') – Name of the data row specifying the end of the range in the label table.

  • label_name (str, default='Label') – Name of the data row specifying the label value in the label table.

  • keep_labels_dataset (bool, default=False) – Indicates if the label dataset should be kept.

Methods

finish()

Can perform actions that are required to clean up after the task has finished, e.g. close network connections etc.

in_out_default

input_output_dataset

input_output_machine

input_output_mode

input_output_name

log

modify_data_row

modify_dataset

modify_dataset_dict

modify_machine

modify_main_dataset

modify_main_machine

modify_main_measurement

modify_measurement

set_logging_level

transfer_metadata