Embedding
The first step in the agile modeling process is to embed your data.
Embedding Rationale
Each window is itself an extremely high-dimensional object, however we would like to make sense of the properties of the birds vocalizing in the given window. Do to this, we use an embedding model. An embedding model takes a window as input and outputs a vector in , where is embedding dimension.
Let and be two embeddings for a given species (say Blue Jay). Then, we denote the distance between and by . This distance is a metric that gives us a notion of similarity between embeddings. We usually use the inner product for this metric1, however there are other metrics we can use, such as the Euclidian distance.
Given that and both contain the same focal species, we expect their inner product to be high. Say that is an embedding for another species, such as Great-horned Owl. Then we expect and to be small, because these embeddings come from different focal species.
Thankfully for us, the hard work of creating these embedding models has already been done for us! So all we need to do is run these embedding models on our data, making our task of creating a classifier far easier (and computationally cheap).
Usage
To embed your data, we use the following command:
perch-analyzer embed \
--data_dir=<data-directory> \
--ARU_base_path=<base_path> \
--ARU_file_glob=<file_glob>
data_diris the directory used to setup a project.ARU_base_pathis the base path of the ARU recordings. Ideally, this path is an absolute path such as/home/mschulist/birds/caples_soundARU_file_globis the file glob used to identify ARU recordings within theARU_base_path. If my files were in/home/mschulist/birds/caples_sound/*.wav, then I would setARU_file_glob="*.wav". Note the addition of the quotations around".wav". This ensures that the command line does not automatically expand out the file glob and match all files with the given glob.