From the course: Artificial Intelligence Foundations: Thinking Machines

Unsupervised learning

- So, you've seen how artificial neural networks can tune into different patterns. Each neuron is like a member in a marching band. They march in layers, one after the other, and pass information to the layer behind them. They tune their instrument and if it matches the note, then they strengthen their connection to the next row. After a few million tries, your neural network can match any music to the song that you fed into the first row. How your marching band actually matches the music is still a bit of a mystery, maybe there's one part of the song that's really common. As long as there's a match, then they know that it's the same song. To anyone outside the band, it all happens as if it's in a black box. That being said, humans will still have a role to play. Let's say that you've been very happy with how your neural network identifies your songs, so now you want your marching band to do something even more impressive. You want to be able to catagorize any song that's fed to the bandleaders in the front row. That means that if you give them any Rock 'n' Roll song, the rest of the band should be able to catagorize it as Rock 'n' Roll. The same should be true for Jazz, Classical, and even Broadway musicals. There are two ways that you can teach your marching band to catagorize each song. The first way is called supervised learning, the second way is called unsupervised learning. For supervised learning, you give the marching band a small set of data called a training set, in this case, it'll be several Jazz songs that have many of the same attributes of common Jazz music. Then you'll tell your marching band that this type of music is called Jazz. You put thousands of Jazz songs through your band and train them on how to classify Jazz music, then you try some test songs to see if it all works. Once the marching band is trained, then you can start feeding any type of music and they should be able to identify the Jazz music, but not all music can be easily catagorized. Some old Rock 'n' Roll songs sound a lot like Country music, some Country music songs sound a lot like the Blues. You'll need to put a human expert in charge of making the decision for the best category. In this case, you might try unsupervised learning. For unsupervised learning, you just want to feed all the music that you can through your marching band, then you ask them to create different categories based on what they hear. The marching band won't use terms like Jazz, Country, or Classical music, instead, they're just going to create arbitrary categories to group the music together. At the end of the day, you'll have a bunch of AI created categories. It's very possible that they won't be the same as human created categories. Your neural network might decide that Country and Blues are basically the same type of music. They also might decide that Jazz is actually two different categories of music, maybe something like Cool Jazz and Classic Jazz. Having your neural network create its own categories has its own advantages and disadvantages. The advantage is that these categories might be much more accurate. There are probably some Country music fans that wouldn't mind listening to more Blues. Sometimes you'll see this in music services like Apple's iTunes. You might be a Country music fan and see the service recommend a new song that's catagorized as Blues or Rock 'n' Roll. You may have never picked out that song on your own, but the AI agent catagorized these as having a similar music pattern. The disadvantage is that the categories might be completely different from their human created counterparts. If your neural network created 48 new categories of music, that will not necessarily help you find your favorite songs. That's why if you're starting your own AI product, you want to figure out how you'd like to catagorize your data. If it's essential to use human created categories, then you might want to stick with supervised learning. That way your neural networks will always look for patterns in your well-established categories. You might want to try unsupervised learning if it's more important to accurately group things regardless of the human created categories, but you're probably much more likely to find similar songs to the ones that you like if you work with AI created categories.

Contents