class pumpp.task.DynamicLabelTransformer(name, namespace, labels=None, sr=22050, hop_length=512, p_self=None, p_init=None, p_state=None)[source]

Time-series label transformer.

name : str

The name of this transformer object

namespace : str

The JAMS namespace for this task

labels : list of str [optional]

The list of labels for this task.

If not provided, it will attempt to infer the label set from the namespace definition.

sr : number > 0

The audio sampling rate

hop_length : int > 0

The hop length for annotation frames

p_self : None, float in (0, 1), or np.ndarray [shape=(n_labels,)]

Optional self-loop probability(ies), used for Viterbi decoding

p_state : None or np.ndarray [shape=(n_labels,)]

Optional marginal probability for each class

p_init : None or np.ndarray [shape=(n_labels,)]

Optional initial probability for each class

__init__(name, namespace, labels=None, sr=22050, hop_length=512, p_self=None, p_init=None, p_state=None)[source]

Initialize self. See help(type(self)) for accurate signature.


__init__(name, namespace[, labels, sr, …]) Initialize self.
decode_events(encoded[, transition, …]) Decode labeled events into (time, value) pairs
decode_intervals(encoded[, duration, multi, …]) Decode labeled intervals into (start, end, value) triples
empty(duration) Empty label annotations.
encode_events(duration, events, values[, dtype]) Encode labeled events as a time-series matrix.
encode_intervals(duration, intervals, values) Encode labeled intervals as a time-series matrix.
inverse(encoded[, duration]) Inverse transformation
merge(data) Merge an array of output dictionaries into a single dictionary with properly scoped names.
register(field, shape, dtype) Register a field as a tensor with specified shape and type.
scope(key) Apply the name scope to a key
set_transition(p_self) Set the transition matrix according to self-loop probabilities.
transform(jam[, query]) Transform jam object to make data for this task
transform_annotation(ann, duration) Transform an annotation to dynamic label encoding.