dcase_util.data.ProbabilityEncoder.binarization
- ProbabilityEncoder.binarization(probabilities, binarization_type='global_threshold', threshold=0.5, time_axis=1)[source]
Binarization
- Parameters
- probabilitiesnumpy.ndarray
Probabilities to be binarized
- binarization_typestr (‘global_threshold’, ‘class_threshold’, ‘frame_max’)
- thresholdfloat
Binarization threshold, value of the threshold are replaced with 1 and under with 0. Default value 0.5
- time_axisint
Axis index for the frames Default value 1
- Returns
- numpy.ndarray
Binarized data
- Raises
- AssertionError:
Unknown binarization_type