ahof1704 / VocalMat

Analysis of ultrasonic vocalizations from mice using computer vision and machine learning
https://www.dietrich-lab.org/vocalmat
Apache License 2.0
21 stars 10 forks source link

main vs total frequencies in VocalMat #26

Open mtehrani-code opened 2 months ago

mtehrani-code commented 2 months ago

Hello,

We have been using VocalMat for mouse vocalization classification and we were wondering how the program calculates the main vs total frequency measures, both for the min/max and the mean values? In other words, we are not sure what these measures are or how they are different. We did not find information about this in the Fonseca et al. 2021 paper.

Any help explaining these would be appreciated!

-MT

gumadeiras commented 2 months ago

Hi @mtehrani-code, main vs total refers to the main components of a vocalization vs including the harmonic components. Some vocals will have harmonics that show up in different frequencies but overlapping in time, and usually weaker in intensity; see the example below. VocalMat identifies which is the main component of the vocalization and reports the stats separately. The stats for main are only for the main component, and the ones for total also include the harmonic components. Let me know if something isn't clear!

826

mtehrani-code commented 2 months ago

@gumadeiras thank you for the response!

We wanted to follow up with a few more questions:

Does VocalMat compute a dominant or peak frequency (Frequency at highest amplitude)? If so, how can we get that output? How does VM compute minimum and maximum frequency values, i.e., are these a fixed amplitude or decibel value relative to the dominant or peak frequency? Is this a VM function or a MATLAB function?

Thanks in advance!

MT

gumadeiras commented 2 months ago

we don't have any functionality implemented that gets the frequency based on the amplitude, but you could get that information by changing some of the code.

If you look around line 363 in the classifier file, where it says if save_excel_file==1: https://github.com/ahof1704/VocalMat/blob/master/vocalmat_classifier/vocalmat_classifier.m#L363

That is the section of the code that creates the sctruture of the output excel file. You can check what it's doing for some of the columns there, for example:

mean_freq_total(i) = mean(tabela_all_points{i}(:,2));
min_intens_total(i) = min(tabela_all_points{i}(:,3));

So you could add code there to analyze the intensity values and, based on that, decide whether to select or calculate something related to the frequency values for each vocalization