Assignment 2 - Genre Classification
Download the GTZAN Genre Collection database from
For this assignment we will only use the classical, jazz, metal, hiphop, and country genres.
a) implement 5 audio features with a 2048 block size and 1024 hop size
     i. Spectral Centroid
     ii. Maximum Envelope per block
     iii. Zero Crossing Rate
     iv. Spectral Crest Factor
     v. Spectral Flux
and compute summary features (mean and standard deviation) for each audio feature so that there is a single feature vector (made of 10 total features) for each file
b) normalize the feature results
c) generate scatter plots for pairs of features and use different colors for each of the 5 genres
     i. spectral centroid mean and spectral crest factor mean
     ii. spectral flux mean and zero crossing rate mean
     iii. max envelope mean and max envelope standard deviation
     iv. zero crossing rate standard deviation and spectral crest factor standard deviation
     v. spectral centroid standard deviation and spectral flux standard deviation
d) implement a kNN classifier
e) rank the features for individual classification performance with kNN with k=1 by performing a 10-fold cross validation
f) compute a feature covariance matrix and discuss the results (write your own covariance function, don't use Matlab's "cov" function)
g) compute a sequential forward feature selection and plot the
classification performance depending on the number of features (training
set only)
h) pick the best feature set and evaluate again using a 10-fold cross validation using kNN with k=1,3,7 and generate confusion matrices for each k
i) discuss the resulting confusion matrices, how does k affect classification? do you think these are reasonable accuracy rates?