Bayes Networks, Hidden Markov Models and How I Wake Up | Learning Intelligence 10

Daniel Bourke walks through his Udacity AI Nanodegree progress, covering probability, Bayes networks, and hidden Markov models with plain explanations and the Monty Hall problem. His capstone project uses HMMs to recognize American Sign Language gestures. He shares morning hydration and exercise routines, plus productivity tactics like cutting expectations by 50 percent.
Chapters
What's going on, guys? Welcome to Learning Intelligence Episode 10. So this morning I tried to wake up a bit earlier than usual and it went alright, but I woke up extremely tired. So I figured I need to do something to wake myself up. So 20 push-ups, 20 jumping jacks, 20 squats, and I'm gonna get into study. Two quick tips for waking up. So first of all, move around, do some movement, do some push-ups, do some jumping jacks, do some bodyweight squats, go for a walk or something. But before that, drink 500ml to a liter of water. Because when you sleep, you're in your bed, your body, it sweats, you get dehydrated, and being dehydrated is not a good place to be. So, rehydrate and get moving, wake up, get learning. That's what I'm about to do. Decided to head into the library today. I find more and more often when you're surrounded by people in a good environment doing this, a similar thing to what you are, and this goes for the bad case as well. Like, for example, when you go to gym, you're surrounded by people working out, so you're more likely to work out. When you go to the library, you're surrounded by people who are studying, so you're more likely to study. And vice versa goes for the bad things. If you're surrounded by people who are doing not so great activities, well, then you're more likely to participate in those non-good activities, even though at the time you might think that they're the right thing to do because everyone around you is doing the same thing. But I'm going to go to the library for a few hours, work through the Udacity artificial intelligence and nanodegree classes, and look what happened to my water bottle. I was getting out of the car hopelessly and it shattered everywhere. I had to pick up all these shards of glass and put it into a little cardboard box that I had in the car. I didn't have any plastic bag or anything. I picked up most of them, but I couldn't get the really small ones. There's some glass shards on the sidewalk here, and I'm very sorry about that. I'm gonna go tell someone. That's what you get for using a glass water bottle. I just got back from the library. It was actually quite packed. Like, there wasn't many places for me to take a seat. I had to do a few laps before I could find somewhere to sit down and do some study. That's a good sign. I like seeing people in the library, and I'm glad I went because I got some really good study done. Like, I went through— the past 2 days have been 2 days where those events happen where it just deters you from what you actually wanted to do. Like, you know, when— well, for my example, I set out 6 tasks I want to do the next day the night before with the number one priority being the first task, and I don't do anything else other than the first one. And I struggled to even get the first one done the past two days, and so they've carried over on the subsequent days. So going to the library was a real good chance to catch up on those things I was planning to do yesterday. But someone smarter than me, I read somewhere, said whatever you set out to plan to do in your new time frame, readjust it by about 50%, and that's, that's an accurate goal of, of where you'll end up, unless you're really good and you just, you just managed to punch things out. But I wrote down 'cause I went through so many things. I wrote down what, what class I went through. So essentially I'm working towards the final project of term 1 of the Udacity Artificial Intelligence Nanodegree, which is using hidden Markov models to detect American Sign Language. So different sig— s— different gestures in American Sign Language. That's gonna be really fun. I'm really excited about this module actually. The first class was on probability. The second class was on Bayes nets. And then third class was on inference in Bayes nets. And now I'm up to about 3/4 of the way through the Hidden Markov Models class. And I'm listening to all the videos on 1.5 speed. I go through them really quickly the first time around, and then I go back through them to, to re-cement the knowledge. That's how I've done it the past few, past few modules. And I'm really enjoying that process of doing it. Today has definitely been a productive day. I completed these 4 classes. So, Probability, Bayes' Nets, Inference and Bayes' Nets, and Hidden Markov Models was the one I just finished up there. And now, my next task is to use HMMs to recognize American Sign Language. But as I said before, I'm going to go back through those 4 classes— probability, Bayes nets, inference in Bayes nets, and hidden Markov models— to gain a deeper understanding. As well as, I've got a fair few readings that I need to get through. So I probably won't start the project for at least another week or so. That'll give me— that'll still give me 12 days to work on the project. That's the goal anyway. All this talk of Bayes networks, probability, hidden Markov models, and I haven't even given an example yet. I've just told you what I've done. So I've written some notes here about what my overview of the 2 main concepts in, in those 4 lectures that I went through— probability, Bayes nets, Bayes nets inference, Hidden Markov Models. And so first of all, Bayes' network— well, let's start at probability. So probability at a very basic level is the chances of something happening. What is the likely outcome of an event? For example, a coin toss. If I toss a coin, what is the likelihood that it appears heads and tails? Every time it's a 50% chance of landing on either side. If I do it 10 times, 5 out of 10 times I'll get heads, 5 out of 10 times I'll get tails. Now that won't always happen. Sometimes I'll get 7 heads, 3 tails, 8 heads, 2 tails, vice versa, whatnot. But the longer you do it out, say for we, we toss a coin 100,000 times, it's more than likely that it's going to converge into a normal probability distribution. So 50,000 heads, 50,000 tails, or very close to that, that ratio, 50/50. This is a very simple overview of probability. What's a Bayes network? A Bayes network is essentially a graph showing the chances of one thing occurring based on the chances of another thing occurring. Let's use the Monty Hall problem as an example. If you've never heard of it, Monty Hall Monty Hall is a game show host. The classic problem is there's 3 doors and you can choose 1 door. 2 of the doors have a goat behind it. I'll put a picture here so you can see. And 1 of the doors has a car behind it. And say you choose door number 1. Monty Hall will then open up door number 2 and reveal that door number 2 has a goat behind it. So now you know definitely that door number 2 has a goat behind it. And what the host does is he tries to trick you and say, oh, well, he pretends he tries to trick you. Do you want to switch from door number 1 to door number 3? And what is, what would this like in a Bayes network? When you choose door number 1, you have a 33% chance of choosing the car. And then when you open up door number 2, it takes away the fact that door number 2 is an option anymore. So now you have a choice between door number 1 and door number 3. Should you stay with door number 1 or switch to door number 3? So because door number 2 was opened, it increases the likelihood that door number 3 has the car behind it by 33%. So essentially the probability from the chances of door 2 go to the chances of door 3. Long story short, you should always switch because when you choose door number 1 and you have the option of switching to door number 3, Switching means that you've essentially picked two doors instead of just one. So the Bayes network of this might look like a graph showing you the effects of opening door number 2 had on the probability of door number 3. What's a hidden Markov model? Well, the academic definition is a statistical tool used for modeling generative sequences characterized by a set of observable sequences. Before we talk about hidden Markov models, an example of a Markov model would be deciding or finding the likelihood of tomorrow being sunny based on today being sunny using say for example, 100 days worth of previous weather history. Or what's the likelihood of tomorrow being rainy based on today being sunny, based on 100 days of weather history. And a hidden Markov model would be, say you worked in a windowless room, say this room had no window, and I was, I had no previous weather data, and I was trying to predict whether tomorrow was going to be sunny, but I didn't know what today was. So how, how could I get this information? That's when I can go to other sources, and I can use the fact to say, for example, people are walking around wearing sunglasses. I can probably infer that it was sunny because people have sunglasses on. Similarly, if they were using umbrellas, I could probably infer the fact that it was raining. So that's where I could get— that would be my observable data. And in the case of a hidden Markov model, I can observe the fact that people are wearing sunglasses and using umbrellas, can use that information to generate a model that's predictive of the next day's weather. So that's where the hidden part comes in of hidden Markov models or HMMs. The fact that I can't see a previous history of weather, but I can observe other data. The direct information of what I'm trying to predict is hidden. But there is still observable information that is related to the hidden information or the information I'm trying to predict. That's my understanding of both those things so far. Bayes' nets, hidden Markov models, and probability. I just gave some really simple examples. Of course, you can go as deep as you want with this. Like, the rabbit hole keeps going with this sort of stuff. It's actually quite complex once you, once you get down into the deepness of it, but that's what makes it so interesting, so exciting. Otherwise, I'll link some Eli Five documents of what I just went through. That's where I learned most of this stuff from. I did watch the lectures and have information overload because it was probably at a higher level than what I'm at just yet. So, I use the ELI5 or the Explain Like I'm 5 documents to sort of give me that foundation knowledge. And then when I go back through the lectures for the second time, hopefully it does that like that second coat of paint, makes everything all shiny and smooth. Guess what? I'm going to Melbourne tomorrow. I'm going to pack my stuff, get it ready. It's pretty late at night. It's about 8:30 or so. But otherwise, today I spent most of the day editing a video for Learning Intelligence Episode 9. So, that should be up now, now that you're watching Learning Intelligence Episode 10. And before I go to bed, I'm going to finish off with a few readings from this. This will definitely put me to sleep. And so I'm trying to take a new approach to when I'm reading before bed. Most of the time I sort of just get into bed and then I just read a few pages of something. It has recently been this, and this is, aside from this book, Game of Thrones is the longest books I've ever actually read. So I'm up to book 2. I've watched all the TV series. It's my favourite show apart from Mr. Robot, of course. Um, but otherwise I got a fair few readings to do in here. Next week's goals are going to be go over the classes I went over this week or re-go back over them and start getting ready for Project 4, so the final project in the Artificial Intelligence Nanodegree. Otherwise, I'm gonna go pack my suit and I'm gonna be out for the weekend. So this is the last clip in Learning Intelligence Episode 10. If you want to see anything in a future video at all, leave a comment below. Otherwise, thank you so much for watching and we'll catch you next week. Keep learning!
More from Daniel

Small Language Models (SLMs) Are the Future: Fine-Tuning AI That Runs on Your iPhone

Introducing Sunny - A MedGemma-Powered Skin Health Tracking App (Kaggle Competition Entry)

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 4 - Comparing the results

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 3 - Running LLMs on the RTX 4090

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 2 - Formalizing the tests

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 1 - Creating a series of tests

Local Multimodal RAG on the NVIDIA DGX Spark | Part 4 - Publishing our demo to Hugging Face

Local Multimodal RAG on the NVIDIA DGX Spark | Part 3 - Putting it all together


