dcase_util.data.OneHotLabelEncoder.encode
- OneHotLabelEncoder.encode(label, length_frames=None, length_seconds=None)[source]
Generate one hot label matrix
- Parameters
- labelstr
Class label to be hot
- length_framesint
length of label matrix in frames, use either this or length_seconds, if none set, one set in constructor is used. Default value None
- length_secondsfloat
length of label matrix in seconds, use either this or length_frames, if none set, one set in constructor is used. Default value None
- Returns
- self