dcase_util.data.ProbabilityEncoder.collapse_probabilities

ProbabilityEncoder.collapse_probabilities(probabilities, operator='sum', time_axis=1)[source]

Collapse probabilities along time_axis

Parameters
probabilitiesnumpy.ndarray

Probabilities to be collapsed

operatorstr (‘sum’, ‘prod’, ‘mean’)

Operator to be used Default value ‘sum’

time_axisint

time axis Default value 1

Returns
numpy.ndarray

collapsed probabilities

Raises
AssertionError

Unknown operator