We used the dot product to find the error
between the predicted nth term and the actual nth term of the input
music. For our purposes, we chose to use the 25th order after
determining that it yielded the highest accuracy
experimentally.
Error = A * X
= X (n) – A (2)*X (n-1) – A (3)*X (n-2) – ...
– A (N+1)*X (n-N)
The predictor was used to determine the error
between the input song and the genre (our genre database). The idea
is that the genre that gives the least error would be the genre of
the input song.
RockLPCTotal ErrorClassicalLPCTotal
ErrorRapLPCTotal ErrorInput Song? Genre ?
This figure represents the testing of the
song with each genre database. Testing consisted of the following
procedure:
We first loaded the input song. Then applied
it to the database for each genre (one at a time) to determine
which genre it is most similar to. For the first genre, find the
LPC coefficients for it. Then section the input song vector into
two sections of length 25 each, as shown in figure 2. Apply each
section to the LPC coefficients to find the error for each section.
Then sum up the errors in each section to find the total error for
that genre. Finally, do it for all the genres. By the end of this
procedure, we would have the total errors for each genre. And the
minimum error should be the genre that the input song belonged
to.
Sections of song vector (fig. 2)