Simply put, it's a way that musicians (in the western tradition) denote which notes should be played in a piece of music by marking which notes should be played as a half tone sharp or flat from their natural pitch. These notes are determined by the key of the piece, which, in turn, is determined by the chord progressions of the piece. The key signature reflects the notes of a scale, which can be Major or Minor, or one of the many different scale modes such as Phrygian, or there are many variations outside of the traditional scale of seven tones like the Blues scale.
One of our classification goals was to be able to categorize music by its key signature. Since there is a lot of overlap between the different keys as to which notes are played sharp or flat, our goal was determine a song's corresponding major key. We tried two different methods of identifying the key signature of a song: first, by decomposing the song into its frequency components and using inner products to measure similarity to the frequency components of all the 12 major scales, and second by using a cross correlation method to identify which frequencies are most present in the song and correlating that to a major scale using the number of sharps or flats that were most prominent. You can read more about the individual algorithms under the subsections "FFT Method" and "Cross Correlation Method".