2020 Machine Learning Roadmap (87% valid for 2024)

Daniel Bourke walks through the ML tools practitioners actually use: Transfer Learning and AutoML for quick prototypes, experiment trackers like Weights & Biases, pretrained model hubs like Hugging Face, and deployment frameworks like Streamlit. He argues you learn math on demand, not upfront, and build your roadmap through projects and sharing your work.
Chapters
If you can't tell, I'm so, so, so excited to be able to share this with you. Now I'm not going to hold you up for long. I just wanted to take care of a few things before we get into the roadmap. But the most important point is to make sure you have a play around with it yourself. Check it out. All the links that you need will be below. There's the mind map itself or the roadmap itself. There's the GitHub repo to go along with it, which has the full version image of it. The most up-to-date link will be the, the map itself. There's also the slides in the GitHub repo if you want to check them out. So, oh, and there's also timestamps, so feel free to jump around. You don't have to watch the whole thing, just jump around to points that suit you best. And if there's anything else that's missing, if you have any questions, leave a comment below and I'll get back to you. But nonetheless, Enjoy. All right, all right, all right. Welcome to Machine Learning Roadmap for 2020, aka a machine learning flavored visual interactive living mind map/compass. Well, that was a bit of a mouthful, but let's not spend any more time talking about it. Let's actually see this thing. So if we come here, oh, this is interesting. We've got some colors, we've got some nice icons. We've got a little white box with machine learning in it. And so what we're going to do in this video is basically explore the field of machine learning as much as we can in a relatively long, short-ish video. I mean, whole textbooks have been written on machine learning, of course, but that's not what we're here for. We're going to go through some of the main topics of machine learning, such as machine learning problems, the process, aka the steps in machine learning project, the resources, like how you might want to learn machine learning, the places you want to visit, the tools you can use to get the job done. And after all, since machine learning is, is basically mathematics under the hood, we'll see what some of the main topics are in terms of what kinds of math runs our machine learning algorithms. But how we're going to do this, we're going to be playful, and that's what I want you to do with this resource here. By the way, all the links that I mentioned throughout this entire thing will be in the description below, so you'll be able to access this as well, go through it, come to Whimsical. This is the tool we use, by the way, Whimsical. So if we click this little button here, whoa, it's going to expand out. Look at that. Far out. We're going to jump through some of these, maybe not all of them, because again, don't want this video getting too long. If you do see a little purple button like this, you can see some more commentary because other than filling up this space, I've just added some comments there. And if you want to leave your own comment, you can add one here. So I've got mine here. You can probably place your own as well. Now let's get started. What I've got to go along with this is a little presentation. So what we're going to start with is a question probably smart to answer in doing a machine learning roadmap video. And that is, what is machine learning? You might be asking as a curious internet-dwelling user. Maybe you. I just kind of said that. And so for the sake of this video, I mean, you could Google machine learning, you could get hundreds of different definitions, but for the sake of this video, to keep it nice and simple, we're going to treat machine learning as turning things, aka data, into numbers and finding patterns in those numbers. You might be wondering, well, how do you find those patterns in numbers? Well, the computer does this part. How? Math. And again, we'll cover a little bit on this later. Now, if you want another one-liner definition of machine learning: machine learning is the field of study that gives computers the ability to learn without being explicitly programmed. Now, that was by Arthur Samuel. I think that was almost over 50 years ago now. So that's a key point there. Without being explicitly programmed. So let's jump into traditional programming, which you might call Software 1.0 versus machine learning, Software 2.0. Now you might be wondering, what's the difference between the two? What's the difference between traditional programming, the difference between machine learning? Well, before we even get into the difference, I just want to let you know is that machine learning, to put it into practice, requires traditional programming to exist, whereas traditional programming does not require machine learning. So although machine learning is amazing, remember, you will need some traditional programming skills to be able to use it. So if we come back here, you might be wondering, where did Software 2.0 come from? Well, that's when we can go to the roadmap. Again, if I mention anything, it's probably in the roadmap. So if I search Software 2.0, There we go. This is what I want you to do as well, is once we've had a little bit of exploring, again, we'll go through this in a minute. We're in the intro part just now. So Software 2.0, hmm, click on the link. Oh, we got a blog post here. I sometimes see people refer to neural networks as just another tool in your machine learning toolbox. Neural networks are not just another classifier. They represent the beginning of a fundamental shift in how we write software. They are Software 2.0. So I'll let you read that. I'm not going to read through it all, but this is the kind of way that you can explore this roadmap is that every little topic here, if it requires more information, I've put a link there. So be sure to check those out. But let's go back to the presentation. And so let's have a visual demonstration of what traditional programming is compared with a machine learning algorithm. So in traditional programming, let's say you wanted to cook your favorite roast chicken dish. Look at that. That's delicious. I know we're talking about machine learning, but it's always a good time to talk about food. So with traditional programming, you might start with a couple of inputs. So say you've got your box of vegetables and the raw chicken. You might program these steps. You might go, step 1, cut the vegetables. Step 2, season the chicken. Step 3, get the oven preheated. What temperature? Who knows? That's up to you. That might be a passed down recipe from your Sicilian grandmother. Cook the chicken for 30 minutes, add vegetables. And then if you've done all this correctly, if you've started with the right ingredients, you've started with the right rules that you've programmed yourself, you might end up with this beautiful roast chicken. Whereas a machine learning algorithm usually starts with a set of inputs and a set of ideal outputs. In this case, the ideal output is our Sicilian grandmother's 'Roast chicken recipe,' and it might look at 100 or 1,000 different examples of these inputs and outputs, and then it's going to figure out the instructions to what the recipe is. So rather than us explicitly writing these instructions, this is a machine learning algorithm figuring out patterns in data. Actually, before it could even figure out these patterns, it would have to figure out some way to translate these inputs and outputs into numbers. And how you do that is going to depend on what problem you're working on. But the overarching process remains the same. Turn your inputs into numbers and then let a machine learning algorithm figure out the patterns in those numbers. Whoo! Now you might be wondering, okay, that sounds pretty cool. So why would we use machine learning? Now, this is a quote from another curious and perhaps even more curious than before internet dweller, which is also maybe yourself. If you're like me, I'm pretty curious about things. And so, the good reason would be, why not? But let's cross that out for a second. The better reason is, can you think of all the rules? Now, what I mean by that, if we think back to our roast chicken example is, of course, for that simple recipe— actually, it might not be that simple depending on how complex your Sicilian grandmother's roast chicken recipe is. But for a more complex problem, do you think if you had to write out, say, 1,000 different rules— we'll have a good example of this coming up soon. But if you looked at something and thought, if I want to teach a car how to drive, do you think you could figure out all the rules by yourself? Well, in my case, I know probably not, but if you had enough time, maybe you could. So let's have a look. What's the number one rule of machine learning? If you can build a simple rule-based system that doesn't require machine learning, do that. And again, maybe this rule-based system is not very simple. Maybe you've got 1,000 different rules of how a car should approach a driving scenario. If it backs out your driveway, maybe that's one rule. Back out driveway, avoid a car. Drive down the hill, that's another rule. Turn right at the stop sign, that's another rule, etc., etc. Don't hit people. That's probably the number one rule there. And now this is a quote again from a wise software engineer. Actually, it's Rule 1 of Google's Machine Learning Handbook, which if we come back to our roadmap, we'll zoom in. Oh, this thing's a little bit fun to play around with. If we go here, machine learning. Actually, if we just search Google machine, boom, Google's Machine Learning Crash Course. Yes. Excellent. Or actually, there's something in here. There's supposed to be Machine Learning Rules, Machine Learning 101. I should have given that something better. Machine Learning 101. I'm going to put in brackets here, machine learning rules. See, this is a search problem, by the way. Machine learning 101, actually 43 rules. So if we come here, we look at our link, rules of machine learning. Now this is by Google, some big dogs in the machine learning field. If, if there was probably one company that's using machine learning everywhere, it's Google. So if we come down here For some reason, my scroll doesn't want to scroll. There we go. Before machine learning, rule number 1: don't be afraid to launch a product without machine learning. As we talked about before, software 1.0, a.k.a. hand coding everything, can exist without machine learning, but machine learning can't exist without software 1.0. So what is machine learning good for? And I just realized that that should probably be, what is machine learning good for? Rather than this incorrect grammar. Anyway, it doesn't matter. So number 1, machine learning is good for problems with long list of rules, just like we discussed before with the self-driving car. If you wanted to code up a self-driving car, you'd have to code in everything such as stop at stop signs, wait for pedestrians to cross the road, avoid hitting that beautiful little dog that's just run out and chasing a ball. So when the traditional approach fails, machine learning may help. Number 2, continually changing environments. So, again, with the self-driving car, the reason why I use self-driving cars, it's fairly easy to imagine these kind of scenarios. If you were driving along your, in your local suburb, you might know how to drive around pretty well. So, you might be able to code those rules for your local suburb pretty spot on. But then if you ventured out, say, into another city, a continually changing environment, the rules that you made for your suburb of where you live may not work very well. So in essence, machine learning is good for problems where it's required to adapt, aka learn about new scenarios. And finally, discovering insights within large collections of data. Now, can you imagine trying to go through every transaction of your, let's say, large company has ever had by hand? Like say you wanted to group together certain people Like, what are people purchasing during winter? What are people purchasing during summer? If you're Apple, what kind of people are purchasing iPhones? And now, I mean, that's probably not a good example because Apple's pretty big on privacy and they don't like collecting that sort of data, but maybe they will analyse it without having your specific user ID in there. So, again, if you tried to discover those insights within, let's say you had an imagine Excel spreadsheet with 10 million plus rows and you're trying to go through all of your customers' purchases, how long do you think that would take? That would probably take you a fairly long time, but these things, the problems with long lists of rules, continually changing environments, discovering insights within large collections of data, this is where machine learning really flourishes. If we want to see an example of this in practice, this is from Tesla's Autonomy Day video. If we go here, this is actually a really cool video. You can probably see why I was using the example of the self-driving car. It shows you how Tesla uses machine learning in production. So they're probably another one of the biggest companies that is actually using machine learning extensively in their products. So if you imagine Tesla have a data source, which is their cars, and they collect data from the environment. These cars have a series of, I think it's 8 cameras. They have a radar. So all of these cars are collecting information from the environment. Now, if you imagine there's a camera on the front here, and that camera is taking photos of what the car can see, essentially. Now, the job of a machine learning algorithm is to turn these photos here into numbers, to find patterns in those numbers. Maybe it goes through these, it uses something like a convolutional neural network, which might look like this. It's a machine learning model drawn out. It might go through each of these pixels, convert them into numbers, and go, "Oh, okay, I see this little number here that resembles a car, that resembles something that I've seen before. These numbers here along this straight line, okay, that looks like a road lane, and I've seen these before. And over here, that's a couple of headlights, so we want to avoid that. We want to not turn left into those headlights because that's another car." And That would be quite disastrous. So, if you were to try and code up all these rules yourself, that would take a very, very long time. So, again, where does machine learning come into play? Problems with long lists of rules. So you might want to use computer vision to go through these and figure out where all the different patterns are. Now, what happens here? Okay, we might collect some data from the environment and find out that Scenarios like this are pretty inaccurate. So we might do some testing and then we might go over here and find some more parts where the car isn't doing very well. The machine learning algorithm doesn't quite know these scenarios because this looks like it's in a tunnel of some sort. You might have treated your machine learning algorithm or your hard set of rules to work for your suburb. But as we said before, if it works in your suburb, it won't necessarily work in a tunnel. So this is where machine learning comes into play again in continually changing environments. Such as a road tunnel. I mean, if I was to code up a self-driving car, I don't drive through tunnels that often, so I'd probably forget to put in tunnels. And then when my self-driving car approaches a tunnel, because it's got a whole bunch of hand-coded rules for driving around my streets, it would be like, "I'm not sure what to do with this." So then you might grab these scenarios, you might label them. That means you've got someone looking at this, maybe a human annotator or maybe another machine learning model, looking at these scenarios it doesn't know very well and go, "Okay, I figured out these scenarios. This is actually a tunnel. These are the tunnel walls." These are quite hard to see, but if you look closely, there's a truck here. There's lights at the top. Maybe a car, a self-driving car gets confused with these lights at the top. They kind of look like road lanes. So we'd have to label it to tell our machine learning model. Remember, machine learning model starts with inputs and outputs. In our case, the outputs are the labels. So just like our chicken example, the inputs may be the ingredients for your grandmother's famous roast chicken dish. In our case, the ingredients might be the images collected from a self-driving car, and the outputs may be the actions that self-driving car should take. Finally, once you've got those inputs and outputs together, you might train a machine learning model, which usually looks something like this. And then deploy it back to the car. So eventually this becomes a loop. And so you see, this is the final thing that machine learning models are really great at, is discovering insights within large collections of data. So you could imagine if you're continually doing this loop, this little data engine here, we'll dive back into this in another section of this video. But if you imagine this is going to start collecting lots and lots of data, lots and lots of information. And when I say data, that term is very broad. Now, one kind of data could be photos and videos collected from the 8 cameras on a Tesla car. Another one could be all of the transactions in your company's purchase history. Another one could be all of the text on Wikipedia. Regardless of the data source, the principle remains. How do we turn this information into numbers, let a model find some patterns in it, and then us design the software around it? This is usually software 1.0. To take the outputs from the machine learning model and translate them into actions in a Tesla car. Now, if you want to see this in more in-depth, I encourage you to check out this Autonomy Day video. It's very, very good. And so what we're going to cover pretty broadly, that was like a long-winded bit of an intro into machine learning in general. I mean, again, you could look machine learning up and you could find out your own stuff, but we've covered enough to understand what we're going to look through in this video. So number 1, we're going to look at machine learning problems, aka what does a machine learning problem look like? How do you diagnose a machine learning problem? Machine learning process. So once you've found a problem, what steps might you take to solve it? Number 3, machine learning tools. Now, what tools should you use to build your solution? This is growing quite rapidly, actually. And now machine learning mathematics. As we said, the computer finds patterns in our data and essentially what it's doing there is a whole bunch of math. So what exactly is happening under the hood? Now, machine learning resources. Okay. Now all of this is pretty cool. You might be saying, how can I learn all of this? Well, the good news is, is that a lot of it is available online and you can access it right now. And how are we going to go through all this? Well, if we had a cook and a chemist style, if a chemist, if you imagine, is really, really specific going through all of these things, we're not going to go through it in chemist style. We're going to go through it in cook style. So, if you imagine what a chef does, what a cook does, a chef uses their tools, such as the controlled use of fire and a knife, and then it goes through and solves problems. So, that's how we're going to do this. We're going to cover these topics broadly. We're not going to dive too deep into each of them. If I was to go through these and tell you exactly what each one of them is, that would be doing you no justice. Instead, what I will continually emphasize doing is actually on the next slide, is how to approach this roadmap. The number 1 thing to do is explore. Number 2 is to comment on this video or on the roadmap itself, to give feedback. What's missing from it? Because of course machine learning is a broad field that chances are I've definitely missed something. Give advice if you have any. Share it if you want. Follow your curiosity, because there is a lot. So, don't expect to get it all. In fact, I actually don't get it all. I've put a lot of it here and I've kind of put it here for myself as well, so I can come back and research and upgrade my own knowledge. And finally, we've got explore again. I put it there twice on purpose because that's what I want you to do, is explore. So, in fact, you'll probably realise that this is not a roadmap essentially telling you where to go. It's more a compass, giving you a little non-linear giving you a gentle push. That's a little pun there from neural networks as well. Okay. Are you ready? Okay, let's go. Did you like that little sparkle effect? I thought that was pretty cool. So let's go. We'll go back. Boom. Let's get our machine learning roadmap reset. And we've got 5 major branches here that we're going to go through. And we've got our little counterpart presentation. Number 1: Machine Learning Problems. As you can see, I've kind of created a little subsection in the presentation for each of these little branches here. Let's get into the first one. Number 1: Machine Learning Problems. So if we go this, what is wrong with this picture? As you can see, this is actually a little bit of famous metaphor here. Is putting the cart before the horse. This is probably the number one skill I can give you throughout this whole video, is to make sure when it comes to machine learning in general and machine learning problems, it can be tempting to jump straight into machine learning and just go, boom, let's just put machine learning in this thing and make it great. I can tell you out of my own experience working as a machine learning engineer, dealing with a lot of customers and clients that wanted to know about machine learning and see if it could be used, this was their problem. And including— it actually is my problem as well because I'm a machine learning engineer. I look at everything with machine learning as my tool. I want to use it for everything. But again, this is coming back to that Software 1.0 versus 2.0. Machine learning is amazing. We've seen some of the examples of where it can be used, but it does require a horse. So what I mean by that is if you keep trying to apply machine learning to everything, It's kind of like putting the horse before the cart. So, the idea of this section is to go from having the horse before the cart to having it in the correct order. Now, if we go to machine learning problems, we've got categories of learning: supervised learning, unsupervised learning, and transfer learning, reinforcement learning. There's probably some others here, but these are the 4 main ones you're probably likely to encounter most often. You can break them into your own subset. Let's go finally jump in to the roadmap. Oh, I'm so excited. You ready? Let's expand it. Here we go. Machine learning problems. And what I've done is I've correlated, as I said before, the sections here to the sections here. So if we come in here, this is how I want you to use this roadmap. We've got machine learning problems. We break it out. We come up here, categories, types of learning. So supervised learning. What is that? You have data and you have labels. In our self-driving car example, our data might be images of tunnels, images of roads, images of people crossing the road, and the labels might be what those things actually are. So it's one thing to have just the image, it's another thing to go, okay, I know this is an image of a person crossing the road, I know this is an image of a stop sign. And so what the model does is it tries to learn the relationship between data and labels. Okay. In our cooking example, it's trying to figure out the recipe. So this is the machine learning model finding patterns in numbers. For example, you have 10,000 photos of cats and dogs, 5,000 each. In our case, this would be balanced class problem. Oftentimes in machine learning, actually, you'll have 9,990 photos of cats, but only 10 photos of dogs. As you could imagine, a great example would be a self-driving car problem where you've got a dog riding a bike. Maybe you've got a million photos of a person riding a bike, but only one photo of a dog riding a bike. And who knows, maybe that's actually an alien. So that's what you got to watch out for, but we'll cover that later. And the labels for which photo contains which animal. Photo 1 equals dog, photo 2 equals cat. Works for numbers too. For example, if you have 10,000 houses and their selling price, use the information about the houses, such as number of bathrooms, such as number of garages, such as number of bedrooms, and try and predict the selling price of the house. Wonderful. I'm not going to read out all of these. This is what I want it to be. It's like kind of just a bouncing back and forth. And truth be told, you could probably tell I haven't scripted this. So I'm kind of just working this out on the fly as well. Unsupervised learning is data with no labels. So the model tries to find patterns in the data without something to reference on. For example, you might have 50,000 transactions and 49,997 of them are similar, but 3 of them are completely outlandish. This kind of problem is called anomaly detection. Other common problems include clustering and dimensionality reduction. Then you've got reinforcement learning. Actually, I could put a link for all of these, couldn't I? Maybe I should do that. Transfer learning is when you take the knowledge from one model and use it in your own. For example, take all of the text from Wikipedia, learn the relationships between words, and use these underlying relationships to help you build your insurance quote classifier. Now, transfer learning is a very valuable skill. So we've got here transfer learning, because oftentimes in practice, training a machine learning model— so say you're building a self-driving car, for example, from that Tesla Autonomy Day video that we talked about— That took 70,000 hours to train on a GPU cluster or GPU hours. Now you might not have access to that, but the beautiful thing about transfer learning is that you can take what another machine learning model has, aka the patterns a machine learning model has learned on a particular dataset, adjust it to your own, and then use it for your own problem. So if we come back to the PowerPoint, now we've got machine learning problems. Some problem domains. Now, some of the main ones, we've kind of hinted on them just before, are classification, regression, clustering, and dimensionality reduction. Again, you could divert these into more things, but chances are, if you figure out what— actually, there could be sequence-to-sequence here, but I haven't covered that. You could argue that sequence-to-sequence is actually a form of classification. We'll get into that in a second. We're kind of jumping ahead of ourselves here, Daniel Bourke. Come on. So classification would be like, does someone have heart disease or not based on their medical records? Regression would be predicting a number, trying to predict the sale price of a house. If you were in the real estate business, you might be wondering, what should I list this house price for? So you could build a machine learning model to go through all of the previous sales in your area and figure out what the most ideal price is for your certain house. Based off the sale price of all of the other houses. So, clustering. You might want to find out what different groups there are. As we said before, say you had a whole series of transactions or a whole series of people listening to your songs. Say, for example, you're Spotify and you have a million people listening to different songs. What kind of songs are they listening to? So, maybe the people in this group are really into folk music. The people in this group are really into rap music. The people in this group are into pop music and the people here are really into rock. Yeah, rock and roll. Then finally, there's another one called dimensionality reduction, which is— there's a little thing in machine learning called the curse of dimensionality, which is when you have so much data that a model can't really even find any patterns in it because there's just too much of it. So what dimensionality reduction tries to do is reduce that amount of data you have to only really pull out the most important thing. So it might get rid of the weight column. This is a table of numbers, by the way. Remember, a machine learning algorithm finds patterns in numbers. So if we come back, we got our classification problem. We might start out by doing some dimensionality reduction because we're finding a machine learning model can't really figure out if a person has heart disease or not. It might go through— this is a simplified table of medical records— and go, you know what? The only real two things that we need to know if someone has heart disease or not, again, this is just a made-up example, is their heart rate and their age. If their heart rate's too high, they've probably got heart disease. And so, we actually don't need their weight. Again, this is a made-up example just to simplify it and put it on one slide. And so, we come back to our roadmap. We've got some example problems. And before we even get to that, we've got classification. So let's try clicking on this link. Machine Learning Mastery. This is a great blog. You should definitely check it out. That's kind of what I've done actually. In this roadmap, I've put all of my favorite resources for different things, or just really great resources for different topics. So you should definitely, definitely, definitely check out the links. If you want more information, I've kind of given a little blurb about a lot of things that deserve a little blurb, but if they need an expansion, this is where the links come in. So classification. We got our binary classification. Is this email that I'm receiving to my inbox, my email inbox, is this spam or not? Again, imagine trying to code up all the rules for deciding whether an email is spam or not. You would probably use machine learning for that. Is this photo of a cat or a dog? You could probably code in a cat's ear looks like a certain thing, a dog's face looks like a certain thing, but I'm too lazy to do that. That's one of the reasons I like to get in the machine learning, is that the computer figures these things out for you. Multiclass classification. So that was binary, if something is one thing or not. Multiclass is when you have multiple different options of what a specific thing is. If in the case of traffic lights, Is it green? That would be class 1, or class 0 if you started from 0. Yellow, that would be class 1, or red. What breed of dog is in this photo? So you might have 120 different dog breeds and you want to try and build a machine learning model to classify what type of dog it is in a certain photo. We actually did that. I teach a machine learning course, by the way, so this is a little bit of a plug for that, but Obviously you don't have to do it. I just want to show you an example of what a project in machine learning looks like. We come here, load this up. So we use transfer learning. Remember what transfer learning is? Come up here. Taking the knowledge from one model and use it in your own. That's what we did for this project. So we turned some dog photos into numbers, AKA tensors. We picked a model from TensorFlow Hub. We'll see what that is in a moment in another section of this video. We fit the model. So that meant fitting is basically the same as, hey model, find the relationship between these dog photos and the labels. We evaluated it, see if it was good or not. Then we improved it through experimentation and saved and reload the trained model. So we come here. This is the kind of thing it looks like. All this is machine learning code. Now we come back. There's also multi-label classification. Is what items does this photo contain? What topics is this YouTube video about? So if we were to build a multi-label classification machine learning model on this video that you're watching right now, what would you like the machine learning model to output? Is it a multi-label classification? Could you put multiple topics? Is this video about machine learning on its own, or is it about machine learning problems, or is it about machine learning resources? it could actually be about all of them. So therefore, it's multi-label. Now, if we come back to classification, remember classification is a type of machine learning problem, and then there's example problems, and then we've got evaluation metrics. In other words, how do we know how well our machine learning model has learnt different patterns for different problem sets? So then we can evaluate it with a confusion matrix. You might be wondering, What's a confusion matrix? I'm a little bit confused about a confusion matrix. Well, if we have a look at this beautiful little link in this great guide from dataschool.io, another amazing resource. This is a simple guide to confusion matrix terminology. Okay. Well, if we read through this, okay, this is a confusion matrix here. So the number is 165, the number of total things. All right. And so the actual no, actual yes, predicted So a confusion matrix compares the actual labels from our machine learning problem to the predicted, so what our machine learning model predicted. So ideally in a confusion matrix, I won't go through it too much here, is that on the diagonal you will have all the numbers to their maximum capabilities, and on these sides here you'll have 0. It predicted no, when the actual was yes 5 times. So you would say it's confused on these 2 sets of examples. In other words, it's a comparison between the true positives, true negatives, false positives, and false negatives. But I digress. As I said, we're just going to touch on these different things. Rather than me go through each of them, it's much better for you to follow your own curiosity and figure out what you should do. So if you have a classification problem and you build a machine learning model, you should be looking at these evaluation metrics to tell how well your model is doing. So if we come down to regression, another type of machine learning problem, come back to our slide. Remember, regression is if we were trying to predict, say, a number, say the ideal sale price for our house. We come back, example problems: given the number of bedrooms, number of bathrooms, and house location, predict the sale price of a given house, or how much will Bitcoin be worth tomorrow. So if we look up Bitcoin price, now you see what we've got here. All of this is actually information. This is data that machine learning model may be able to find patterns in. And now I'll give you a little bit of a warning for prediction. It's actually very hard. There's actually a lot of companies that do dedicate a lot of time and money to figuring out what the price of Bitcoin is or what the price of stocks are. But this is just another example of where you can go, okay, you might look at this and go, PayPal deal won't drive Bitcoin price higher. If you were to base your entire prediction of Bitcoin's price tomorrow by this headline, what would you think? So PayPal deal won't drive Bitcoin price higher. Hmm, you probably want to read the article for more, but if I was to base it just off this one heading of the article, I would say Bitcoin price will either not change or will, in fact, maybe go down a little bit based off this headline. And now again, I may be completely wrong, but this is the type of thing that a machine learning model could do. It could take in all of these headlines. It could even read the article, turn it into numbers of some sort, and then look at the history of Bitcoin's price, something like this, and see, okay, well, on June 29th, it was $13,348 Australian dollars, and these were the news headlines on that day. And so if we come back, so if we go one week, on June 25th, it was $13,552, and the news headlines were saying that Bitcoin was going to go up, but actually went down. So you might be able to figure out these patterns yourself. But again, chances are, could you code all the rules yourself? I know I probably couldn't, so that's where you'd want to probably use machine learning. We come back in to evaluate how your machine learning model is going there in a regression problem. You usually want to use R-squared or mean squared error or mean absolute error. So mean absolute error is all errors are on the same scale, e.g., if trying to predict 100, predicting 99 is the same error as predicting 100 1, whereas squared error, it makes the outliers stand out more. That means if being 10% off is more than twice as bad as being 5% off, you probably want to pay more attention to mean squared error. Again, we've got some links here. Woo! We're blistering through this, aren't we? Now, another problem that we haven't mentioned here on the machine learning problems is sequence-to-sequence. So if we've got here, sequence-to-sequence is taking a sequence of something and turning it into a sequence of something else. In other words, given a sequence of English text, translate it into French. So if we go here, Google Translate, this is a sequence-to-sequence problem because we go here, I love machine learning so much. We want to translate it to, let's say, Spanish. Amo tanto el, el Friends y Xavi Automático. Now, if you can speak Spanish, you can probably correct my pronunciation or say whether this is actually a correct translation. But this is an example of a sequence-to-sequence problem using machine learning. Again, if you went through the entire English language, you could figure out the rules of what it translates into Spanish, or you could try to at least. But in my case, I haven't got time to go through all of the rules from English to Spanish. So, I'm more than happy for a machine learning model to look at, let's say, all of English Wikipedia and all of Spanish Wikipedia and see where they line up and then figure out the rules and use the patterns in those numbers. So, turn all of English into numbers, turn all of Spanish into numbers, let a machine learning model figure out the patterns, I'm more than happy to use those patterns. So let's come back. Finally, we've got clustering. We talked about that a little bit before. Then we've also got dimensionality reduction, and some common techniques for doing dimensionality reduction is PCA. And there's also representation learning or feature learning. And again, I've put some notes in here where I'm a little bit torn. So for this one, representation learning may be better off on its own branch. Better off, maybe better off, better off on its own branch. Wonderful. Okay, so we've gone through a bunch of different machine learning problems. Remember, we're cooks, not chemists at the moment. So we've got, if we come back, supervised learning, unsupervised learning, reinforcement learning, transfer learning, classification, regression, sequence-to-sequence, clustering, Dimensionality reduction. There's some of our main machine learning problems. Now, if we come back, we've done one branch. That's beautiful. Let's come back to our little keynote here. What are we up to next? Machine learning process. All right, let's dive in. Now, this is probably the biggest part of the entire roadmap. And you can probably guess why, because the process of doing machine learning is relatively— I mean, let's just have a look. We got here steps in a machine learning project. 172. Whoa, look at that. If we zoom right out, here we go. We've broken it all down. Now, I want to warn you again, is that we're going through this as cooks, not chemists. So this might not be exact. This is just what I've built out of my own experience. What I found is most helpful. It breaks down into a series of subtopics. We've got data collection. So if you want to find patterns in data, how do you collect that data in the first place? Then you've got data preparation. Remember, as we said, machine learning model works on finding patterns in numbers. So how do you turn that data that you collect into numbers? Then we've got right down here, Choosing an algorithm, or actually before that, we've got train model on data, which can be broken down into 3 steps if you think about this. Choose an algorithm, or once you've had a little bit of experience, if you're a beginner, you probably never heard of these steps, but usually it goes, choose a certain type of machine learning algorithm. Usually the algorithm is based off what machine learning problem you're facing. So there's certain algorithms for certain problems. Overfit the model. Overfitting means the model has learnt the pattern so well that it's doing too well. And then reduce overfitting with regularization, which is a technique to hold our model's potential for learning patterns in data, to hold it back so that it can adjust itself to new data. And then if we come down here, whoa, analysis/evaluation. Serve model. So once you've trained a machine learning model, it's one thing to train it on your local computer, it's another thing to have that deployed in production to say a million self-driving cars. And then finally, retrain the model when necessary. So that's what we're going to go through. And again, we're not going to cover all these because that would take way too long, but we're just going to bounce back and forth. So let's go back to the presentation. If we have a look at this, I've kind of made it into a little colorful flowchart too. That's what we want to do is like a multi-angle attack. Remember how I said I broke this down into like 6 different subtopics? Well, that's all in one little beautiful colorful chart here. We've got data collection. We'll ask questions like, what data exists? Where can you get it? Is the data public? Are there privacy concerns? Is it structured or unstructured? And what I mean by structured or unstructured is imagine Structured is like an Excel spreadsheet. You've got rows and columns. Unstructured could be like a photo or a video or natural language text like this. It has some kind of structure. I mean, if it didn't have any structure, a machine learning model wouldn't be able to find out patterns in it, but it's not rows and columns type structure. Data preparation. Here you might do steps like exploratory data analysis, or data preprocessing, remember, turning data into numbers. Data splitting, turning your data into a training, validation, and test set. We'll get into that in a moment. Train a model, choose an algorithm, overfit then regularize, tune the hyperparameters. Once you've trained a model, analyze the model. Once you've analyzed the model and go, "Yes, my model is ready," you can serve it, AKA put it into production so that people can actually use it. And then finally, retrain a model. If your data is continually changing, if you imagine a self-driving car problem where a road has been updated due to roadworks, are your old predictions still valid on that new road? And again, here it's a continuous process. That's why we've got a big loop here, goes back and forth. So in traditional programming, you might just have your code and you have to make sure that your code is up to date. Whereas in machine learning you've got code, you've got data, and you have to make sure that they're both up to date, otherwise you'll be predicting the wrong thing. So if we come back, let's go through our first little step here: data collection. So you've got some questions to ask here. What data sources exist already? Now we're going to have an example of what data sources there are, if we come down in machine learning resources, but we're not up to that yet. If you want to skip ahead, you can definitely skip ahead. What privacy concerns are there? So if you're dealing with health data or medical data, it's probably a wise idea to make sure that no personal information can be leaked. Is the data public? So in the case of Tesla, we can't necessarily access all of their machine learning data. Once you've formulated your machine learning problem, a.k.a. thought of whether it's a classification task, a regression task, one of your first steps is to start collecting data on that problem to figure out if a machine learning model can find patterns in it. What kind of problem are we trying to solve? Well, actually, this should probably be number 1. There we go. That can be in some relative order. Where should you store the data? Do you store it on your laptop, or do you store it in the cloud? And then you've got different types of data, as we said before. Structured data. Data which appears in tabulated format, rows and columns style, like what you'd find in an Excel spreadsheet. Now, even within structured data, you have different types of data within that. Nominal/categorical data. So, is something one thing or another? Are they mutually exclusive from each other? For example, in car sales, colour is a category. A car may be blue, but not white, and the order does not matter. Then you've got numerical, any continuous value where the difference between them matters. For example, when selling houses, $107,850, that's actually probably a relatively cheap house depending on where you're living in the world. I mean, if that was Brisbane, I'd probably snap that house up in a heartbeat, unless it's a bit of a dump. Is more than 56,400. Then you've got ordinal data, data with order. Then you've got time series data, just like that Bitcoin example. This is a time series data because it goes over a time period, 1 week, 1 month. There we go. So that's over a time period. We come back. Now you've got another type of data which we touched on before, unstructured data. So data with no rigid structure: images, video, natural language text, speech, what I'm saying to you right now. So if I wanted to build a speech-to-text system, how could it look at the sound waves that are coming out of my mouth and figure out what that sound wave translates to in text? Now, I want to give you a little quiz as we're watching this. If I wanted to do that problem, turn my voice, my sequence of words— there's a little hint for you— sequence of words into text, what kind of problem would that be? Well, if we come back, all the way back down to our machine learning problems, this is where exploring is so valuable, that would be a sequence-to-sequence problem. Build a device which responds to speech commands. I'm not going to say that because my smart speaker is going to go off. Speech goes in as a sequence of vibrations in the air, what I'm making now with my voice, and it gets converted to text and interpreted as a command. That's a sequence-to-sequence problem. Same thing with playing the voice back. It takes a sequence and then plays the voice back in a sequence of sound waves. Wow, I just really confused myself there with, um, With my words, saying sequence so many times, but you get what I mean. You take one sequence of words, sound wave, generate that into text, and then to, for the speaker to play something back, it will take the text, do some sort of command, and then reply back with the voice. So if we go here, close that one off, now we come back. Now we've looked at data collection. Let's have a concrete example, you know, 'cause we don't just wanna be jumping through all these little tentacles here. We come back to our Tesla data collection and model training little data engine here. Now, how might this fit in to this machine learning process? We've got data collection, preparation, train a model, analysis, evaluation, serve model, retrain. How might this fit in? So if we put that back on the screen, wonderful. So let's have a look at data collection. We might have a data source. Oh, and this is jumping ahead. But that is okay. We have a data source. So the cars, as I said, these all have cameras on them. So they'll be collecting data from the environment, taking photos, etc., etc. That's going to be stored in Tesla's server somewhere. So this is their data collection. They have a whole fleet of cars. Actually, a beautiful— probably one of the best examples that you'll find in the real world is Tesla's data engine. This thing here. So that's their data collection. Now, data preparation, we haven't touched on that yet, so let's do that. Whoa, we come here, we might close this one off so we know we've hit that up. So this is data preparation. And so one of the first steps you might do in data preparation is a little thing called exploratory data analysis, learning about the data you're working with. And if we click this little link here What do we come to? Oh, a gentle introduction to exploratory data analysis by yours truly. So this is an 18-minute article on it if you wanted to find out a little bit more. It goes through an example problem, but let's just talk about what we've got here on the roadmap. So questions you might ask in an exploratory data analysis— basically what you're trying to do here is Before your machine learning algorithm goes through your data, in the case of Tesla, before a machine learning algorithm even looks at this. Now, again, if you were building a self-driving car, you, you might have some experience driving a car. So you kind of know what the data that it's collecting, but you don't know how it's going to look when it's being collected from a camera here, from a camera here, from a camera here. And again, I'm making this up. Maybe they have cameras in different positions. Things you'll be asking. What you're trying to do is just look at the information that you have and kind of build your own machine learning model in your head before you even build one that uses math. So what are the feature variables? What are the inputs? And what are the target variables, the outputs? In our case of cooking our favorite Sicilian grandmother roast chicken recipe, the feature variables, the inputs might be the organic roast chicken or the organic chicken from Ivy and Wood Farm up the road and the vegetables sourced from Blue Mountains and all that sort of stuff. Or really, you could just go buy it from the supermarket. The target variable, so the output might be that beautiful, delicious dish. Or in the Tesla car problem, it might be not to drive head-on into the wall. For example, if you were predicting heart disease, the feature variables may be a person's age, weight, average heart rate, and their level of physical activity, and the target variable will be whether or not they have heart disease. And again, this has been very simplified, but what kind of problem would that be if we were to take someone's health information and try and figure out whether they had heart disease or not? Is it classification, or is it regression? Trying to predict a number? If you guessed classification, 10 points, because that's one thing or another. You might also ask, what kind of data do you have? Structured or unstructured? Categorical or numerical? You might create a data dictionary for what each feature is. For example, if you have a column of numbers called HR, now is that hours? How would someone else know that it actually means heart rate? So these are the things you might line up. Let's go Kaggle. Now Kaggle is another beautiful website for data sources, and actually you can learn a lot from Kaggle. You can look at problems. This is Titanic data. This is what a data dictionary might look like. There we go. Variable. So we've got these inputs here: survival, Pclass, someone's sex, their age. What now? What is sibsp? I don't know what SibSp is, but if we come to look, the definition is the number of siblings, spouses aboard the Titanic. Okay, now I'm starting to understand what kind of data I have. So if we come back, are there missing values? Should you remove them or fill them with feature imputation? See below. We'll have a look at that in a second. Feature imputation is basically just a way of filling missing values. What are the outliers? How many of them are there? Are they out by much? 3+ standard deviations? Now, this is just a little heuristic, you don't have to use that. An outlier will really depend on the data that you're working with. One way to find outliers is to plot a histogram, plot a distribution of your data. If you're not sure what that is, we'll touch on that in a minute. Why are the outliers there? Other questions you could ask a domain expert about the data. For example, Would a heart disease physician— remember our problem, trying to predict heart disease— would a heart disease physician be able to shed some light on your heart disease dataset? More than likely, yes. So we come back, data preparation. We're still going. That was only one step. Exploratory data analysis, the main idea of that is to become one with your data, to build your own machine learning model. Now, data preprocessing. Preparing your data to be modeled. Woo! Yeah, we got a few steps here. Again, I'm probably— it's probably wise because we did cover EDA a bit. Let's just jump to the major topics. Feature imputation, filling missing values. Now what's important to remember about a machine learning model is that for the time being, if you're working with structured data, pretend that your machine learning model can't learn on data that isn't there. There is subtopics about machine learning models adjusting to different data sources and that sort of stuff, but we're not covering that. We're covering the stuff that you're going to come across most often. Machine learning model can't learn on data that isn't there, so what you'll want to do is impute that data, so fill it up. So if you want to have a look at this article, great article here, 6 different ways to compensate for missing values in a dataset. Then you might want to do feature encoding. So once you've filled your missing values in a dataset, you typically do this with structured data, by the way. Feature encoding is turning your dataset into numbers. Now, machine learning model requires all values to be numerical, no matter what you're trying to model, whether it's text, whether it's sound waves, whether it's images, it has to be in some form of numerical form. Then you've got one-hot encoding. Then you've got label encoder, embedding encoding. Now these are just different types of ways of turning your data into numbers. Then you might have feature normalization, or scaling, or standardization. So when your numerical variables are on different scales, for example, the number of bathrooms is between— why don't we put "is" here— is between 1 and 5, and the size of land and size of— oh, maybe we can maybe put this so people know that it's a variable— and size of land— again, this is not scripted, this is just us exploring— this is between 5,000 and 20,000 square feet. Some machine learning algorithms don't perform very well. See how this is between 1 and 5 and the other variable, size of land, is between 5,000 and 20,000? So the scaling is all off. What normalization will do is put your variables between 0 and 1. Scaling and standardization help to fix this. Then there's a little bit more in depth of what each of those are. Feature engineering. So this is where you input your own knowledge into your data. So you might have a collection of data where you've just collected raw form from the environment. And now feature engineering is where you take your domain knowledge and encode that into the data. So transform the data into potentially more meaningful representations by adding domain knowledge. If we click this little article here, boom, Discover Feature Engineering: How to Engineer Features and How to Get Good at It. So I'll let you, you read through that one. Oh, there's a good one there. Feature engineering is an art. So there is a lot of these topics, and this is what, what's quite hard about machine learning actually, is that a lot of these things that we're covering here aren't necessarily exact sciences. So again, it's why I put it in the slides twice before. The biggest thing that I can impart on you is a willingness to explore, to try and figure out, to try different experiments and see what works and what doesn't. In feature engineering, you got different things like decomposing, turning a date such as, imagine you've got this date here. It looks like that, 2020-06-18 at this time. You could decompose that into the hour of the day, the day of the week. What day of week was that? What day of month was that? Is it a holiday? So if you were looking at the Bitcoin price and you're wondering, why is it so low there? Okay, that's $12,963 on June 15th. Maybe June 15th was some special holiday or Maybe something happened on that day that you could encode into your dataset based off this timestamp here. Now, of course, I'm making this up. June 15th may have no significance whatsoever, but these are the type of things that you can use your knowledge to enrich your dataset. Then you've got dicretization. I had to really think about how to pronounce that. Turning larger groups into smaller groups. Got some examples there. Crossing and interaction features, so combining two or more features. Indicator features, so using other parts of the data to indicate something potentially significant. And now, by the way, I've kind of put these in relative order that you'll take in a project, but again, because it's so experimental, machine learning is a lot about just jumping between different things. So can't stress this enough, read through these things and just see if any of them relate to what you're working on, or just you want to learn more in general, hit the link. Feature selection. So selecting the most valuable features of your dataset to model. Remember before when we removed those two features from trying to predict heart disease? The curse of dimensionality. Let's have a look at that actually. Curse of dimensionality. What is this thing I say? The curse of dimensionality refers to the various phenomena that arise when analyzing and organizing data in high-dimensional spaces. Woo! That do not occur. So basically, high-dimensional spaces just means lots of different data, like lots of different features, that do not occur in low-dimensional settings, such as a 3-dimensional physical space of everyday experience. And that's another thing that you'll see with machine learning, because it's a lot of math in there, which is— and don't get me wrong, I'm not taking away the importance. Machine learning doesn't exist without math, put it that way. But you'll see a lot of things that can be quite daunting if you haven't covered math in a while. So you'll see Greek symbols, you'll see terms like high dimensionality space. But the real best way to go about these things is just through practice. Don't worry if you don't get it the first go. Work through problems, work through projects, and read different things from different people, different sources. With time, you will start to understand it more. So with feature selection, you could do dimensionality reduction, feature importance. You typically do that after modeling. Wrapper methods such as genetic algorithms. Whoa, that's a, that's a big word there, Daniel. TPOT does this. I love TPOT. There we go. Some cool code running there. I'll let you check that out. Dealing with imbalances. Remember we talked about this before, we briefly touched on it. Does your data have 10,000 examples of one class, but only 100 examples of another? Now, what's a good example for this? Well, here's some ways that you can deal with that. But a good example of this might be in the case of Twitter. If you have tweets, you might have 10,000 of them that are good, are people being nice, because generally people are pretty nice. But you might have 100 examples of people just being toxic idiots. And you're trying to build a Twitter classifier to go, well, this tweet is nice, or these 100 examples are actually pretty harmful. Like, these are people being really mean to someone else, and that's potentially harmful. So you might not have many examples of these because hopefully people are pretty good. Now, that's data preprocessing in a nutshell. So if we come back, where were we in the presentation? Data preparation. Now, in the case of Tesla, a preparation step might be trying to source different data sources that you don't have very much of. So let's say you've got a stop sign. I've taken this from the Tesla Autonomy Day video, by the way. There was an example in there. You've got some stop signs that are occluded by trees. So imagine this is a stop sign. If you're a Tesla car and you see that, what should you do? So one of Tesla's data preprocessing steps would be to collect more images. Now, this is through analysis and evaluation. Remember, this is a continuous process. Maybe they trained a model, found that their analysis on stop signs was not very good on a certain number of scenarios, these scenarios. So they might want to collect more data for that type of scenario and then train their model to be better on that scenario. Remember, this is a continuous process. So let's go back. Finally, in data preparation, we've got data splitting. Now, this involves splitting your data into 3 sets: the training set, which is usually 70 to 80% of the data, so the model learns on this; the validation set, typically 10 to 15% of the data, the model hyperparameters are tuned on this. Now, if we imagine back to our cooking example at the start, Hyperparameters are the settings on your model that you can use to improve it, such as the settings on your oven when you're cooking your grandma's famous Sicilian roast chicken dish. If you cook it on 200 degrees, it might burn it, but if you cook it on 180, you'll get that perfect dish. And then finally, the test set, which is usually 10 to 15% of the data. You want to keep this separate. So this is like the training set is like if you were studying for an exam, the training set is your course materials. The validation set is your practice exam that your professor sets you. And then the test set is the final exam. So your model's final performance is evaluated on this. And if you've done it right, hopefully the results on the test set give a good indication of how the model should perform in the real world. Do not use this dataset to tune the model. I can't stress that enough. Keep these separate from each other. Whoa. So that's data preparation. And let's go here. Now we've got our data ready. How do we train a model? Remember the 3 steps. Choose an algorithm, overfit the model. So meaning that it's actually learned too well. It's learned the patterns too well. Reduce the overfitting with regularization. Again, if you're beginner to machine learning, You'll look at something like "regularization," you'll be like, "I've never heard of that word in my life." Well, that's okay. We're going to go through what it is. Or another great trick is you just go— I'll show you how to use this. This is a search bar. We type in "what is regularization?" Boom. You'd be amazed at how far you'll get by just reading the top 3 links end to end. Just read them. Don't even bother. Like, if you don't understand some terms, Just read them and then it'll sink into your brain over the space of many months. And then you can come back, read it again. Oh, the second time you read it, it actually makes a little bit more sense. Anyway, step 1, choosing an algorithm. How might we do this? Well, I'll give you one great example. Choosing the right estimator. You might look at this and go, whoa, that chart has a lot of stuff on it. but this is probably something you might get a little bit familiar with when you're starting to learn machine learning. This is scikit-learn. Oh, let's take a little step back here at the moment. You might be asking is, okay, Daniel, you're saying a whole bunch of stuff about machine learning algorithms. Do I have to know how to write all these? Well, let me tell you how a machine learning engineer like myself or like many others do work in practice, even in the Tesla scenario. This model here. Chances are, in Tesla's case, they're probably coding it from scratch. But if you watch this video, they're actually using some form of transfer learning. And it's not necessarily taking a model from another domain because their model is actually very specific to their cars. Someone has created a style of model. In fact, it's called a ResNet model. So if we go here, ResNet, typical naming, residual neural network. So Tesla's models actually use ResNets under the hood, but then they just apply. So say, for example, you might have this part. If someone's already built that, you can access that part right now. But for Tesla's specific problem, they may build these parts with code. So if you're starting out on your own problems, chances are the majority of this has been built for you. You just have to learn how to diagnose a certain problem, get your data ready to fit through this model, and the outputs lined up. That's a big part of machine learning right there. So we'll come back to this. Choosing the right estimator in scikit-learn, which is a machine learning Python library— machine learning model is often referred to as estimator. So if we go through this Let's say for our heart disease classification problem, we have start, we only have, let's say, 300 patients. So we have yes, above 50 samples predicting a category. So we're doing classification. So that's heart disease or not. Do you have labeled data? Yes, we have under 100K samples. So we might gonna go a linear SVC, or you can actually try each of these. The green boxes are machine learning algorithms. If we go here, Ensemble classifier. My favorite is the random forest. Forest of randomized trees. There we go. Now, if you've never coded before, you might look at this and go, whoa, what's going on here? But let me just talk you through this. You've got from scikit-learn.ensemble, so scikit-learn's ensemble models, import Random Forest Classifier. So this is a machine learning model here. In code already written for us. Then we're going to define our inputs, which is usually used as X, which is this series of numbers here. Then we're going to define our labels, which is usually defined as Y. So this is inputs and their ideal outputs that we want. Then we're going to instantiate our machine learning model, which is— CLF is short for classifier. What we want to do here is our random forest classifier to work out the patterns between 0, 0. This is associated with this number here because these brackets, this is one example and this is one example here. This is another example and this is another example here. So clearly the pattern is here is if there's list of zeros, the output we want is zero. And if there's list of ones, the output we want is one. Very simple, but that's how the understanding starts. It starts from the bottom and then we work it up to more complex scenarios like designing a self-driving car. So then we go here, we want n estimators. So a random forest classifier is actually a combination of multiple different models. So we want 10 different models in our clf. And then remember what I said before, fit is actually part of, hey, machine learning model, find the patterns between this and this. That's all we're doing. That's, that's machine learning code right there. Right. How cool is that? So if you understand, we'll go through some learning pathways in a minute, but scikit-learn, chances are, if you're using machine learning, you're probably going to come across scikit-learn. It's actually a beautiful designed machine learning library. And that's just one little part of it. We come back here. So we choose an algorithm. Now, remember what I said, choosing an algorithm actually depends on what problem you're trying to solve. So we've got a series of supervised learning algorithms. So that means you have data, you have labels. You've got linear regression. I've got a link for each of these. Logistic regression, k-nearest neighbors, support vector machines, decision trees, and random forests. We just saw one of those. Now, just knowing this doesn't necessarily mean that you know how the random forest classifier works. Do you need to know how the model works under the hood? Now, I would say to begin with, don't bother learning how each of these work under the hood. Instead, practice applying each one of them in an experimentation fashion. And then when your curiosity gets sparked on a certain type of one, because think about this, that diagram we used before, it's trying to put the cart before the horse. So see if these algorithms work or see if you can apply them in some way. And then when you've got a little bit of momentum going and you want to figure out how do I improve them or how do I understand this more so I know what's going on behind the scenes, then start to dive deeper. So there we go. Neural networks. This is actually— so as you see here, if you think that machine learning is just the neural networks that you see, or the artificial intelligence, also called deep learning, There's actually a lot of different machine learning algorithms, and with a little practice, you'll start to get better at assigning which one for certain problems. Again, it takes a lot of experimentation. So neural networks can be used for a whole bunch of different things— classification, regressions. It takes a series of inputs, manipulates the inputs with linear— oh, fancy word— dot product between weights and inputs, and nonlinear functions, activation function, Hmm, what's that? Well, that's where you do some of your research. You search out like this. What is an activation function? Activation function. Boom. You'd be surprised. Again, Wikipedia, probably full of math. Look at that. But as I said, start by reading. If you're curious about something, just read one post end to end. And then start to dive deeper when you need to. So we've got other algorithms such as gradient boosting machines. We've got links to those different types of neural networks. Convolutional neural networks typically used for computer vision, which is something like this. Convolutional neural network is actually a max pooling layer there. Now we're not diving too deep into what they are. This is a high-level overview. Then you've got other algorithms. For unsupervised algorithms, actually, this is what we're missing. We don't have any reinforcement learning algorithms. In practice, I haven't come across using reinforcement learning algorithms outside of like a research domain. And what I mean by that, the idea of research is sort of, of course, to push forward the knowledge of a space, but it's not always necessary to put something in a practical use case, such as in Tesla's case. Their whole game is machine learning on a scale that they can use in their self-driving cars. But anyway, we have unsupervised algorithms such as clustering, visualization, and dimensionality reduction, anomaly detection. Woo! So once you've chosen an algorithm— there we go. There's a little bit of tidbit. Every learning algorithm has a loss function, an optimization criterion, an optimization routine, Once you've chosen an algorithm, type of learning. Now, how does the algorithm actually learn on your dataset? We've got batch learning. So in other words, all of your data exists in a big static warehouse and you train a model on it. Or you've got online learning. Your data is constantly being updated and you constantly train new models on it. Each learning step is usually fast and cheap, opposed to batch learning, runs in production and learns continuously. So let's think about how Tesla might use batch learning or online learning. Now for online learning, they may have a scenario where they need to quickly update a certain thing in the car. So they've retrained a smaller part of a model and deploy that to it. And so what I mean by that is in our stop sign example, they might have found that, hey, our cars are performing really bad on stop signs like this. So we need to upgrade our dataset so that our machine learning model understands that this is actually a stop sign and this is actually a stop sign and this is actually a stop sign. So they might want to use online learning for that type of scenario. Whereas batch learning is maybe they've got a new style of car in a prototype and it's got, instead of only 8 cameras, it's got 20 25 cameras. So they may take their entire dataset of all the information from the 8-camera cars, combine it with their 25-camera cars, and train a completely new machine learning model in one big hit on all of the data that they have. Now, again, I'm making that example up, but that's just how you can imagine these things. Batch learning, typically everything happens in one big go. Online learning, little by little in a constantly changing environment. Transfer learning. This is so important. I want you to research this. Transfer learning, take the knowledge of one model, what it's learned, and use it with your own. So transfer learning gives you the ability to leverage SOTA. By the way, you're going to see the acronym SOTA a lot in machine learning research. It just means state of the art. So the results your machine learning model are getting are state of the art on a certain problem. This is helpful if you don't have much data or vast compute resources. So use the following resources for different transfer learning models: TensorFlow Hub, PyTorch Hub, Hugging Face Transformers, Detectron2, to name a few. Active learning. So that's where you get a machine learning model to figure out some things of its own, and you also correct it with a human in the loop. So for example, in the Tesla car scenario, our human in the loop may be finding the scenarios where the car doesn't perform very well, collecting more data on that, and then putting it back into the machine learning model. Just like that stop sign we talked about. Ensembling— not really a form of learning, it's more combining different algorithms together. A random forest is an example of an ensemble machine learning algorithm. So that kind of means you're leveraging the wisdom of the crowd. So if you ask one person, hey, what's the best direction to take, left or right? They might say right, but then if you ask 9 other people, they might say left. So should you trust the 9 people or should you trust the one person? Now, if we come here, we've got underfitting. So underfitting happens when your model doesn't perform as well as you'd like on your data. So that means that basically the model hasn't learned as much as your evaluation metric would like it to. And remember, if we come back up here, we go to our problems, we've got a series of evaluation metrics. Say we wanted to train a classification model to 99.99% accurate, but our model is actually underfitting. Where were we? Underfitting. And it's getting only 92% accuracy. In the case of a Tesla car, you need almost 100% accuracy for detecting pedestrians, because if it fails to detect a pedestrian, well, then that's not going to be very good for that pedestrian, is it? So that's an example of underfitting. Overfitting happens when your validation loss— how your model is performing on the validation dataset, lower is better— starts to increase. Hmm. Or if you don't have a validation set, happens when the model performs far better on the training set than on the test set. Now, overfitting is usually, say for example, when you're studying for an exam and you've learned the course materials too much, and then it comes time to the final exam and all you know is how to reproduce the course materials. So your skill set can't generalize. That's a machine learning term there as well. Generalize to a new set of problems. So this, in a machine learning sense, it typically happens when your evaluation metric is far higher on the training set— in other words, the course materials— than on the test set. So the test set is meant to mimic how your model might perform in a deployed scenario. You can fix this through the various regularization techniques. Here we go. Here we got L1 lasso and L2 ridge regularization dropout. So dropout is actually really convenient. It basically says, hey, let's remove just random parts of our model so that the rest of it becomes better. Pretty cool, right? Early stopping. So stop your model before the training or validation loss starts to increase much more. Data augmentation, batch normalization. Again, these things I'm going to be saying them to you, but I'm kind of just tying tying them together with what we're doing here. We're not, as I said before, we're not really diving into them. If you're looking at this and going, holy crap, there is a lot here, and there is, what's important is that as you start to have practice in working with different machine learning problems, you'll start to go, okay, I know where dropout fits in now. I know where data augmentation fits in. I know where batch normalization fits in. All of this comes with practice. What we're doing now is just tying things together. And finally, once you've trained a model, you might do some hyperparameter tuning. So run a bunch of experiments with different model settings and see which works best. So you've got different components with your machine learning models. Remember when I said we have the cooking experiment or the cooking example, and to get the perfect roast chicken dish, we might have to preheat the oven to 200. That would be one setting. We might also have to turn it on fan force. So those would be two settings that we have to choose. So with a machine learning model, you typically have parameters such as a learning rate, which is often the most important hyperparameter. There are different ways that you can set this setting, such as learning rate scheduling or the cyclic learning rate. There's also a different thing such as batch size, momentum, weight decay, number of layers, We've already said batch size, number of trees, number of iterations, and many more. A tip for tuning hyperparameters is if you're wanting to tune hyperparameters, try just searching for the algorithm name, such as random forest hyperparameter tuning. So if we look at this paper, A Disciplined Approach to Neural Network Hyperparameters, let's click this one. So this is the kind of thing, the resources that you come across. This is arXiv, by the way. Where a lot of machine learning research gets published. When you first interact with this, you're going to be like, whoa, a lot of complex stuff going on here. But again, with practice, you'll start to see the value in it. You'll start to understand it more. You'll start to see how you can use it in your own work. This is taking a little while to load, isn't it? A hyperparameter may be— so this is a machine learning model. Let's say each of these is a model in itself. Each of these little boxes. These are often referred to as layers in a machine learning model. Now, if we wanted to improve this model, what we might do is add actually another 3 of these boxes over here. So then we've got a total of, well, there's 1, 2, 3, 4, 5, 6, 7, 8, 9. Maybe we add another 3 boxes over here to find more patterns in data, and then we've got 12 boxes. So now our machine learning model is actually comprised of 12 smaller models. Remember ensemble learning? Now, that's— using ensemble learning here is actually the wrong way to describe it, but in terms of improving our model, one way might be to increase the number of layers here, so increase the complexity of the model. Another way might be to decrease these, so cut this off here and we only use 6 layers. So that is a form of hyperparameter tuning. Any setting that you change in a model by hand is a form of hyperparameter tuning. So we come here, this is what a research paper looks like. Pretty cool, hey? So, A Disciplined Approach to Neural Network Hyperparameters. So if you read through this, although deep learning has produced dazzling success for applications of image, speech, and video processing, what's it say here? Most training are with suboptimal hyperparameters, see, requiring unnecessarily long training times. So in the case of cooking our chicken, an unoptimized hyperparameter setting might be an oven on 100 degrees. So that's going to take far too long for our chicken to cook. So the ideal setting— a machine learning algorithm might have by default 100 degrees as its setting. We might actually need 200. So that's what hyperparameter tuning involves, is finding the right settings for your model. Now I will Give you a little tidbit as well. Usually with machine learning model, hyperparameter tuning doesn't play as much as a part as data collection and data preparation. Those two alone will generally, if you have good data collection, if you have good data prep, will result in a good machine learning model being trained. Analysis slash evaluation. We've gone through a few of these evaluation metrics, but also Not only the metric performance, how long did training take? How long does inference take? And now, and what are the costs involved with that? For example, with the Tesla example, wow, I said example twice. But in Tesla's case, in that Autonomy Day talk, this one here, they said that their model takes 70,000 GPU hours to train. Now let's just have a look at this GPU pricing. If we were to rent a GPU— now, a GPU is a graphical processing unit, which is very fast at finding patterns in numbers, which is what a machine learning model does. If we were to rent a GPU, one GPU is— there we go, US dollars— a Tesla T4, which is kind of an entry-level GPU. Why don't we use a V100? That's actually a really fast GPU. Let's say There we go. P100, $1.46. So if we did $1.46 times— if we want to rent that GPU for 70,000 hours, that's going to cost us $102,200 to train one machine learning model. Now, of course, you're probably not training machine learning models yet as big as Tesla, but these are things you're going to want to take into consideration, not just how well the model performs. If the model performs at 99.9% accuracy but costs $1 million to train and you've only got a budget of $2 million, well, you're not going to be able to train very many models. And inference is how long does the model take to make a prediction. So if our car is on the road and a machine learning model, it could be 99.999999% accurate. But it takes 10 seconds to make a prediction. Do you think that's going to help? Right, the car's driving on the road and it sees a person coming up and it's like, oh wait, I'm just making a prediction, I'm not sure what it is, give me 10 seconds, but I can assure you the prediction will be very accurate. Probably not going to fly. So that's where you have to take training and inference cost into account. The what-if tool. So one of the big things about machine learning is that it's actually very hard to explain what your machine learning model is doing. The what-if tool helps you with that. Visually probe the behavior of trained machine learning models with minimal coding. So I'll let you check out that. That's a big thing about machine learning is explainability. Least confident examples— what does the model get wrong? The bias and variance trade-off. So high bias results in underfitting. Remember we talked about underfitting before, and a lack of generalization to new samples. High variance results in overfitting due to the model finding patterns in the data which is actually just random noise. So machine learning models are actually really good at finding patterns in numbers, but sometimes they're so good they can find patterns in what is just random noise in data. So that's some analysis slash evaluation. Now finally, we got serve model and deploying a model. After you've been through all of this, you've collected some data, you've prepared it, you've trained a model, You've done some analysis and evaluation. You want to get it into the world. So if you were Tesla, you collected data, you prepped it, you trained your model, you did some analysis evaluation. You've even, you've even got some new samples here that weren't very good and you've retrained the model. Now you want to serve it. So how do you get a model, like in Tesla's case, how do you get it to cars? But in your case, you might want to serve it through some sort of API or a web application or an iPhone application. Serving a model is referred to, usually referred to, as deploying a model. So let's put the model into production and see how it goes. Now, you may have the best evaluation metrics in the world, aka in a Jupyter Notebook your model gets 99.9% accuracy on whatever problem it's working, but when you put it into an application, everything starts to change because you're going to get data sources, people are going to use your model differently. That's the real test of a machine learning model. Now, tools that you can use to do this— again, this space is rapidly evolving, so chances are if you're watching this video in a few months, these might be outdated. But right now, TensorFlow Serving is going to be really good, PyTorch Serving, Google's AI Platform— you can make your model available as a REST API— SageMaker, which is Amazon Web Services machine learning deployment tool, and then you've got MLOps, which is kind of this thing, which is, if you've heard of software engineering, DevOps, MLOps is DevOps for machine learning. So it's basically all the technology required around a machine learning model. So all of this stuff here is basically Tesla's data engine from collecting the data from the car. That would be one part of the operation to uploading it to a data source. That would be another part of the operation. And then modeling it. That would be another part of the operation. This would be another part of the operation— testing it, collecting more data, etc., etc., all in a loop. How do you do that? Well, there's a great blog post here by Chip Hewitt. I'll let you read through that one, especially this part here, this link here. Really good. A guide to production-level deep learning. As you see, the modeling code is actually not as big a part as some of the other things here. So make sure you check that out. And then finally, retraining a model. Once your model is deployed, if you find that your model's predictions start to age, not like a fine, fine wine, or drift, that means that the data sources that your model is making predictions on have usually changed. So they might have new hardware. In the case of the Tesla car example, what if the camera's got an upgrade and suddenly your machine learning model that was trained on lower resolution photos doesn't work as well on higher resolution photos from the new cameras. So that's when you'll want to train, retrain your model. Far out, that was a big dog one. Machine learning process, steps in a machine learning project: collect some data, prepare the data, train a model on your data, analyze and evaluate it, serve it, and then retrain the model. If we come back, that's an example of how Tesla would do it. Now, I actually did this in one of my own projects about a month or so ago. I collected some data from Open Images, which is a, a data source. I pre-process it— oh, actually, sorry, I used a Python script to download it. I stored it in Google Storage. I prepared the data with a Python script. I trained a model using Detectron 2 with transfer learning, by the way. And to analyze and evaluate my model, I used Weights and Biases. Now, if you're looking at all these things and going, whoa, whoa, whoa, Daniel, we haven't covered any tools yet. Don't worry, we're going to get to tools. I analyzed and tracked my experiments with Weights and Biases dashboard. I made a user interface with Streamlit, which is a beautiful tool. I wrapped all of this in a Docker container, pushed the Docker container to GCR, and deployed my app with App Engine. So this would be my machine learning ops Machine learning operations for replicating Airbnb's amenity detection with Detectron 2. Now, retraining a model I didn't actually do, but if I was, I would find the worst performing classes. So this problem was using computer vision to detect amenities in photos. Amenity detection. This is what happened. This is the problem in a nutshell. You're Airbnb and you want to find out what amenities, aka an oven or a kettle or a sink or a bench or air conditioner, are in your listings. And so one way to do it is to use computer vision and analyze each of the photos as someone uploads them to your platform, scan for different things in there, and then add it to your list of amenities. So if we come back to the presentation, that's what I did. This was my process that I did. If I wanted to retrain a model, I would find the worst performing classes. So say my model sucked at finding chairs, I would get more photos of chairs, feed that back into my Google Storage for storing all the models— little typo there— and retrain a model and then go back through this process. If you want to see how this was done, there's a link there, deeberg.link/airbnbplaylist. Woo! I think we might be done with machine learning process. As I said before, this is not an exhaustive list. Although we did cover a whole bunch there, this video, I don't know actually how long this section has been going for. There's probably other stuff I've missed out. So if there was, let me know. But As I will keep saying until I go hoarse, go through this, explore it yourself. See if you want to find out anything more. Have a look at these cool little graphics and see how you can tie it in with the information here. So with that being said, what are we up to? Boom! We are up to number 3, machine learning tools. Have a little chill out. I'll be back in a second and we'll go through some machine learning tools that we can use to get the job done. Alrighty, where were we? Machine learning tools. Let's check it out. We got here machine learning tools, tools you can use to get the job done. Might have been a better idea to go in like a nice little circle and do mathematics or whatever next, but we're already here. Boom. So I've broken this one into some libraries. So these are Python-flavored. Might zoom in a little bit there. Libraries, Python-flavored. Now I say Python-flavored, but you can actually write machine learning code in any programming language that does or allows numerical computing. A lot of these libraries here like scikit-learn, PyTorch, TensorFlow, and Python itself actually execute C code under the hood, so really fast code. But when you're first getting started, chances are you're going to be interacting with one of these libraries or one or more of these libraries. I'd actually argue, like, if you're getting into deep learning, you probably should know some PyTorch and TensorFlow. I mean, they have a lot of overlaps, but we're getting too deep at the moment. Let's get back to the little bit of a presentation. And we have another very colorful diagram that has been broken out into some sections. We've got libraries, code, slash Codespace, experiment tracking, pre-trained models, data and model tracking, cloud compute services, hardware in case you wanted to build your own deep learning machine rather than using a cloud compute service, AutoML and hyperparameter tuning, explainability in case you wanted to get insights— why did my model do that certain thing— machine learning lifecycle, aka MLOps, that's probably a better name there, user interface design. At the moment, Streamlit is probably in a class of its own there, it's pretty good. Now We go through these. I'm not going to go through each one of these, but this is probably the main stack we'll be using to write machine learning code right here. Jupyter Notebooks, TensorFlow. If you want to do TensorFlow for the web, you'll use TensorFlow.js. If you want to do TensorFlow on a mobile device or like a small computer, like a Raspberry Pi, you'll probably use TensorFlow Lite. PyTorch is very similar to TensorFlow. PyTorch Lightning is a, like a wrapper of PyTorch. ONNX is Open Neural Network Exchange, which basically converts your TensorFlow or PyTorch model into another type of machine learning model that can be run across many different types of hardware. If you're thinking, well, I'm looking at all these and there's a lot here going on, I mean, I told you, didn't I warn you at the start? There is a lot to go through. So don't worry if everything here seems overwhelming. Rather than trying to learn all of these things in one hit, best to start working on your own problems. And figure out where do these pieces of the puzzle fit themselves in. So if you're writing code in TensorFlow and you need to track your experiments, you might use Dashboard by Weights and Biases. And if you want to pre-train TensorFlow model, you might go to TensorFlow Hub. And if you wanted to track the changes you're making to your data, you might use Weights and Biases Artifacts. And if you want a cloud compute service, well, Google Colab is a free resource But if you need a bigger amount of compute, you might use Google Cloud or AWS or Microsoft Azure. And that is if you don't even have your own computing resources. Now, truth be told, if you're first getting started, you're probably only going to be using Colab to begin with, but then it's very helpful. I will recommend this in the learning resource to learn at least one cloud provider. If you're getting really serious, you might want to build your own deep learning computer, which is basically just a normal computer with a really big dog GPU. We're not going to dive too much into that. I've got some links for those. AutoML and hyperparameter tuning— if you want to improve the settings on your model, or if you want to build an automatically generated machine learning model, there are tools for that out there. It's very rare these days, actually, unless you're a hardcore researcher, to build your own machine learning model from scratch. You would more so use Transfer Learning or AutoML. If you just want to prove a concept as a machine learning engineer, working as a machine learning engineer consulting to other businesses, we would often build small proofs of concept using AutoML if they had any data because it was just easier to do that, get it off the ground, get something working, show them how it worked, and then build out custom features when required. Machine learning lifecycle, you have tools like Kubeflow, Seldon, MLflow. Truth be told, like, this has still been really worked out. Like, this is an evolving process unless you're a giant company who has their own custom machine learning lifecycle. These are open-source tools here. I mean, I think Seldon's now gone into a paid offering, but again, we're getting ahead of ourselves here. If you're just starting out, you probably won't touch these tools until you're at least a year in, at least building your own products or machine learning-powered applications. And then if you want to build some awesome proof of concepts, Use Streamlit. I'm just going to say that. A web dashboard that someone can use on their own computer, use Streamlit, deploy it with one of these cloud services, and Bob's your uncle. That was pretty oversimplified, but that's the main gist of it all. So let's go back to our little flowchart here, or our mind map, or our machine learning compass is what we've been calling it, haven't we? So toolbox, experiment tracking. Now we've got TensorBoard, we've got a link here. Let's have a look at what this looks like. Basically, as I said, machine learning is going to be training a whole bunch of different models and seeing which one works best. TensorFlow— I mean, TensorBoard helps you to figure that out. Now, if we go here, you could also use Dashboard from Weights and Biases. Dashboard experiment tracking for machine learning models, a system of records A system of record. Hmm. Does that make sense to you? Anyway, for your model results. So here, if you imagine here, you've got runs 210, we've got all of these different options here, and maybe these are all of your different results there. So you might go, okay, well, this model up there, that little one there, that got the best accuracy. So I'm going to click on that one and see what hyperparameters got that best accuracy. Neptune AI, similar version as this. I've personally had hands-on experience with Weights and Biases. I actually love all of their offerings. So this is a big shout out to Weights and Biases. Absolutely love what they're making. So make sure you check that out. It's becoming basically a must-have in my machine learning workflow. And this is not sponsored by Weights and Biases. I just really love the products they're building. Pre-trained models. So for transfer learning, you might want to go to TensorFlow Hub. TensorFlow Hub is a library for reusable machine learning modules. As I said, it's getting rarer and rarer these days to build a completely new machine learning model from scratch. This is how easy it actually is to incorporate, like, this one line of code or these two lines of code, incorporate a pre-trained TensorFlow model from tfhub.dev. So you can actually come here Find your problem. If we want image classification, we go image, image modules. How cool is that? Then the same thing is with PyTorch Hub. Now, I believe PyTorch Hub, it's not as well refined as TensorFlow Hub, but it's still got some pre-trained PyTorch models. Great offering there. Hugging Face Transformers. Now, this is— Transformer is a natural language processing architecture. Now, Hugging Face is a natural language processing research team, and they have the biggest open source repository of Transformers. So there you go, you can read about all of them, read about what it's got here. Long story short, if you're working on text problems, you're probably going to want to look into using Transformers. Of some sort. Detectron2 is Facebook's open-source software. There we go, Facebook AI Research for state-of-the-art object detection algorithms. So a lot of computer vision gets done with Detectron2. I've had hands-on experience with that. I am probably missing some things here, so if you have any more resources for transfer learning type models, please let me know and I'll put them in here. But there's some of the main ones. Like, this will take care of almost 80% of your problems if you check in here. Now, it's one thing to track modeling experiments. So what changes have you made to your model and how does that affect performance? It's another thing to start tracking data. So remember in the machine learning process, if we expand this big dog here, we had data preparation. So preparing your data to be trained for a model. Now, When you collect data, chances are when you prepare it, you're going to make some changes to it. So you might want to keep track of the changes that you've made to your datasets. That just makes sense, right? Like if you've got the original dataset that you've collected and then you make a change on it, you've got change 1 and the model does performance on that. You got model 1, you make change 2, but then you rerun model 1 on change 2. All of a sudden, you do that a couple of times and you're going to get very mixed up. But Artifacts by Weights and Biases— remember how I said I love Weights and Biases offering— now have a way to version your dataset. So track the changes that you've made to the data that you're using, and then build reproducible machine learning models on those different datasets. Awesome, awesome tool. Then you've got DVC, which is, I think it's open source actually. There we go. Open source version control system for machine learning projects. So this is really like machine learning, it's hitting the pointy part where it's merging with software engineering. Remember at the start of this presentation, we talked about Software 1.0 and machine learning being Software 2.0. Well, they're kind of merging into being one thing. But Data Version Control, check that out if you need to track your datasets, track your models. Now, cloud compute services. You might be wondering, why do I need a cloud compute service? Well, if you remember our overarching definition of what machine learning is, it's finding patterns in numbers and then doing something with those patterns. But to find those patterns in numbers is fairly compute intensive, which means it requires a lot of computing power. But good thing is GPUs, which is a graphical processing unit. Let's look up this GPU. Graphics Processing Unit. Here we go. Specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer. Oh wow, that's a formal definition there. What I want you to think of a GPU is just really fast at processing numbers. Now, if you don't have a GPU on your laptop, my MacBook Pro, what I'm actually using to record this, has a GPU, but it's not an NVIDIA GPU. So there we go. Now NVIDIA kind of have like, how do you say, monopoly on machine learning GPUs. So that's my MacBook Pro's GPU. If I wanted to use TensorFlow or PyTorch, one of these machine learning libraries, it doesn't work without a lot of hacking very well with my MacBook Pro's GPU. So I need an NVIDIA GPU. Now you might be wondering, how do I get one of those? Well, Google Colab provides one for free. If we go to Colab, I'm just going to show you the dog vision project that we went through earlier. If I wanted to set up a GPU here, I could go change runtime type, hardware accelerator. I can even use a TPU, which is a Tensor Processing Unit. A tensor is just a like a neat package of numbers. So it's like rows, columns, and also dimensions that are going back, like the z dimension. And then it can actually be an infinite amount of dimensions. So a computer is very good at visualizing things or understanding things that has more than 3 dimensions, whereas we humans aren't very good at that. Now, if Colab— because it's free, it has some limitations. If that doesn't suffice your needs, you may want to look into a cloud compute service such as AWS. Their machine learning offering is SageMaker. Cool name, hey? Machine learning for every developer and data scientist. AI platform on GCP, which is Google Cloud Platform. It's formerly called Machine Learning Engine. Or Azure Machine Learning from Microsoft Azure. Now these, okay, they're going to have different names and fancy different marketing terms. They're basically different versions of the same thing. Depending on where you work or your own— like, personally, I just like Google Cloud Platform because that's the one I've got most experience with. I've used AWS in the past. I've worked with companies that have used Microsoft Azure. It really just depends. But basically, these three big dogs kind of own the cloud computing game. There's probably a few more out there that I haven't listed. If you do have one you'd like me to recommend, I think there's FloydHub. What's another one? Gradient. Paperspace. That's another one. Paperspace. FloydHub. Deep Learning Platform. Paperspace. But yeah, you could use these if you want. I'm just putting these there because they're the most common. Hardware, if you wanted to build your own deep learning PC, that means you're doing some, maybe you're building a machine learning startup or you want, you don't want to pay for cloud services every month. These are the articles you should read. You're basically going to need a GPU. So read this post by Tim Dettas and this article by Jeff Chen, which is arguing why you should actually build your own deep learning PC. I think the math comes out to it. If you're using cloud compute for a long time, you want to build your own deep learning PC. That's the sort of route I'm taking. I'm building my own. I'm currently in the process of building my own deep learning PC. Now, another tool in your toolbox is AutoML. Ooh, auto machine learning. So remember how I said building a machine learning model, like a custom machine learning model, By hand is becoming more and more less common. Remember how I said right back at the start how machine learning is like figuring out or calculating the rules or figuring out the patterns in your dataset? Why not use machine learning just to build itself? That's the premise of AutoML. You can also use that for hyperparameter tuning. So just like we were, we were turning the dials on, on our oven when we're cooking our Sicilian grandmother's beautiful roast chicken dish. We could actually use machine learning on that to figure out what the best set of hyperparameters are, or the best settings on the oven are. So we could just end-to-end machine learning the whole thing. Now there are a few different libraries that you can do. For scikit-learn style machine learning algorithms, you'll want to have a look at TPOT. We kind of touched on this before. Really cool piece of software. What it does is a nice graphic here. Here we go. TPOT will automate the most tedious part of machine learning by intelligently exploring thousands of possible pipelines and find the best one for your data. How good is that? That's a great sales pitch. Automated by TPOT. So this is what you're going to have to do. You're going to have to collect the data, clean it, get it ready for a machine learning model. TPOT will do all of these steps such as feature processing, selection, construction, model selection. It will also do parameter optimization. Then once it does all that for you, you're going to have to validate it. So TPOT takes care of all that. That's pretty cool, hey? Google Cloud AutoML. So you can come up here. If you don't have much machine learning expertise of how to write code, you can just plug your data into Google Cloud. You got AutoML Vision, video intelligence, natural language translation, even machine learning on tables, automated on structured data. The downside is that you need to run API calls to Google for inference. So if you wanted to deploy your model and have it run locally on a small device, that's probably not a great option because you're going to have to— you don't get to keep the machine learning model if you train it on AutoML. That's kind of a common theme with a lot of AutoML services. Maybe that'll be changed in the future. Microsoft have an offering. Weights and Biases again have another offering for scalable, customizable hyperparameter tuning. Now you just, just go to Weights and Biases and check out their whole offering. I mean, products amazing, resources— if you want to learn machine learning, check it out. Documentation could do with a little bit of improving, but we're not going to complain, are we? If you build some awesome stuff, you're going to get popular. Finally, there's Keras Tuner. Probably a few more options here, but these are just some of the main ones. Keras is another deep learning library or framework that is now part of TensorFlow. So it's quite confusing, but if you go to keras.io, you can use Keras on its own. Simple, flexible, powerful. Sounds like me, except for simple. I'm a complex being. You can run it on TensorFlow 2, so built on top of TensorFlow 2.0. There you go. Deploy anywhere. See, TensorFlow and Keras had a love child. And if we go back, where is it? Get started. Oh, there we go. Introduction to Keras Tuner is actually in the TensorFlow documentation. So this is just going to help you tune your Keras model. If we got, got some stuff here, we don't have a great, but that's all right. Now, once you've trained a machine learning model, you might want to explain it. We kind of touched on the What If tool before. So the What If tool helps you to compare different machine learning models. This is really important, right? Like if we're deciding whether or not someone has heart disease, You might want to know why the machine learning model predicted that. So if we go here, what is it? Compatible. See? Supported data and task types. Binary classification, we've touched on that. Multiclass classification, regression, tabular, image. This is the explainability problem. You'll often hear in, in machine learning that it's a black box. Like, you kind of pass a whole bunch of things to an algorithm, the algorithm figures out the patterns, and then it just gives you an output, but you don't know the patterns. But the What-If tool and SHAP values— so that's the other explainability tool— uses game theory to explain the outputs of your machine learning models. SHAP is actually pretty cool. There we go. You get some interesting graphics like this coming out of it, and it's all to help with explain why your machine learning model made the decision it did. So again, if you're predicting heart disease, your machine learning model goes, "You have heart disease," and the doctor's looking at it, it's like, "Well, I don't really have anything else to offer except that the model says that you have heart disease." Well, you probably want some information to go, "Oh, well, model noticed that your average heart rate is 145, and so your heart has to beat really hard to pump because your veins might be blocked to the brim with cholesterol. Now again, I'm making that up. Don't take that as a real explanation. The What If tool and SHAP values actually don't produce that, but they can produce different things like why a certain feature contributed how much to a certain prediction. All right, now machine learning lifecycle. This is probably going to be a little bit further on in your journey. When you're first starting out, you're going to go through I think mostly just in this stage. Like, this is how I've actually tried to stage a lot of this roadmap or compass, whatever you want to call it, is the branches here are in cascading effects. So you'll start with the libraries, you'll track your experiments, you'll look for pre-trained models, or maybe you might do that before that. That's probably better. Data and model tracking, that kind of comes under experiment tracking. Cloud compute services, But yeah, once we get into the full-blown ML machine learning lifecycle, you'll want to look at things like MLflow, Kubeflow, Seldon, Streamlit. Also, let's just have a look at one of these. Also, that document that we just had a look at before, Chip Ewing MLOps. We had a look at this one before, but this is actually— this article only came out a couple of days ago, so it's, it's really worth checking out. I enjoyed it. There's a great resource right at the top here. This is a guide to production-level deep learning. Maybe I'll just put that in there. Boom. And I encourage you, actually, if this roadmap isn't supporting your needs, if you think it can be improved, just make your own. This will actually help you— what is it called? A Guide to Production Level Deep Learning. A Guide to Production Level Deep Learning GitHub repo. If it doesn't suit your needs, create your own. It'll actually— even if you just copy out what's on here and make sure you actually read the different things, it will help with your understanding. So MLflow, that's what we're going to look at. An open-source platform for the machine learning lifecycle. MLflow tracking projects, models, registry, built-in integrations. These are all other machine learning tools that you can use. There we go. Azure Machine Learning, that's Microsoft Office— I mean, offering Microsoft Office. SageMaker, we mentioned that. Google Cloud, Kubernetes, that's what Kubeflow is. I imagine Kubeflow is just a workflow that's built on top of Kubernetes. If you don't know what Kubernetes is, it's a framework for building containerized applications. E.g., one container does one thing such as preprocessing data, another does another thing such as model data. If we go to Kubeflow, the machine learning toolkit for Kubernetes. This is a lot to take in. Again, this won't be— these sort of tools won't be until later stage in your development, especially if you're just getting started with machine learning. But they're worth knowing about because at the end of the day, if you want to build things with machine learning, this is where you're going to end up. If you want to build things that get into the hands of people, this is where you're going to end up. One of the most beginner-friendly points here, actually, we'll put it up here, is Streamlit, or beginner-friendly tools, sorry. I've used this to create proof of concepts. So Streamlit, the fastest way to build data apps. Look at that. So say, for example, you're building a model which detects cars and pedestrians and traffic lights in photos of street photography. This is what Tesla could use to test out how their different models are going. Now, of course, I don't know what Tesla actually use, but this is what Streamlit is intended for, to go, you've built a machine learning model. Now let's build something that you can actually explore what that machine learning model has learned. And look how easy it is to get started. pip install streamlit, streamlit hello. They're two lines of code that you run in a terminal, by the way. There we go. So if I just ran pip install Streamlit. I'm pretty sure I've already got it. I'm not going to do that, but that's a little challenge for you. Try that out. Try Streamlit out. Highly recommend. All right. Oh, and then I just put this blog post here. So what I learned from looking at 200 machine learning tools. Now we've covered what, maybe 20 here. Now again, these are just the 20 that come to my mind or the 20 that I have at least a little bit of experience hands-on. Using. So, there's going to be many more. There's definitely many more that I've missed, but the tools themselves don't necessarily matter as much as what you do with them. So, don't be— it's a typical problem for an engineer is to get obsessed with the tools rather than what they actually build with the tools. So, right back to the start, we said we were going to explore this roadmap as cooks. What does a cook do or a chef? A chef uses the controlled use of fire and a knife as their two major tools. So in fact, you can actually get majority of what you need done with something like just using pure TensorFlow and then build a model with that and then build a proof of concept with Streamlit. You'd be surprised how far you'll get with just those tools. I mean, if you use TensorFlow, you're probably also going to use TensorBoard, so that's That's probably 3, and maybe Weights and Biases, 4. There you go. Don't overload yourself. Now, we've gone through tools. What are we up to next? Come back to our keynote. I'm going to have a little sip of water. Ah, as you might have read by this, this is point 4, machine learning mathematics, and this beautiful little abacus emoji. There wasn't one for a calculator. But that's all right, let's have a look. Now, machine learning mathematics, these are only some of the main ones, and as I said, I'm not going to be going into each of these in depth. I'm just really basically going to be listing the names because one of the main questions I get, people asking questions about machine learning, is how do I learn the math? And I think it's because math is actually taught pretty poorly in school. When I started learning machine learning, I started to like math way more. I mean, I've always been a numbers dude. I like I like numbers. But when I started to learn machine learning and I realized, wow, it's actually just applied math and math is really just the language of nature. So machine learning is one part linear algebra, one part matrix multiplication manipulation, especially if you're using neural networks, one part multivariate calculus, one part the chain rule. This is basically the entirety of backpropagation, which is how many neural networks learn basically or improve their errors is through backpropagation. Probability and distributions, and then optimization. So again, when we said finding patterns in numbers, how do you find the optimal pattern in numbers? So if you imagine this little top of the hill, that's the maximum. Usually in machine learning, you're trying to find the minimum. So you're trying to reduce the loss function, which is usually something that measures how wrong your machine learning algorithm's predictions are to what they should be. So that's an optimization problem. But if you just literally go to the Wikipedia page for each of these, read just what they are. If you went through high school, you might have covered them. Do you need to know the ins and outs of all of them to get started with machine learning? No. My approach is write some machine learning code and then learn these parts when you have to. So let's come back. Machine learning mathematics, what's running under the hood? There we go. So linear algebra, creating objects and a set of rules to manipulate these objects, e.g., x squared. x is the object and squared is manipulating that object. Machine learning is about finding the right set of objects and the right set of rules to model a dataset. Whoa, That's a pretty cool explanation, if I do say so myself. Now again, you could read through this, you're going to get a lot more complex explanation. I can only fit— I'm sure, as you'll imagine, someone will probably get angry at me for describing these in only a couple of sentences. I can only fit a couple of sentences here. So if you have a better explanation, please let me know. But there we go, linear algebra. If you want to read through that, look, if you haven't done math in a while, you're probably going to be like, "Whoa, that's a lot of things I don't understand." But then what you're going to do is you're going to go 3Blue1Brown linear algebra, and you're going to watch all of these, and you probably again still won't understand it. But then you're going to go to Rachel Thomas computational linear algebra, and then you're going to learn linear algebra with code. Look at this bad boy. We got code in here. I think this just might be an intro. There we go, we got some code. So I'm going to— where is it? Come back here. I'm going to copy this and I'm going to put this in the roadmap. Linear algebra. Boom. Actually, this should probably go in resources, but that's all right. Computational linear algebra. Well, that's how I do it. You can do whatever you want. I'm not your boss, but that's how I go about these certain things. If I need to know a topic, I go to multiple different sources to figure out things. I compress the knowledge in my own words into a couple of sentences and then start to build upon that. Now you might be thinking, Daniel Bourke, when should I start learning all of these different math things? Well, my biggest thing is, can you solve the problem you're currently working on? This is no shortage amount of content here. This is a lot of math. They do have overlaps. Yes, you're right. But if you just go and try and learn these willy-nilly without having something to relate it to, at least in my case, I find it very hard. Like, that's just pushing a boulder uphill. When I am working on a problem and I am stuck on something, Then I find it really easy to learn something like matrix manipulation. In machine learning, data, all kinds of it, often gets turned into rows, columns, and features. Features is the third dimension. It actually is the n dimension, which can actually be many dimensions and numbers. Actually forgot what I wrote. These collections of numbers are often referred to as matrices or tensors. So then I go to something like that, and then I go to here, I go to Wikipedia page, I read through it. I go, yep, yep, yep, that's matrix multiplication. I try it out for myself. So as I said, I'm not going to really go through these other than just a high-level overview of them. You'll probably want to know some multivariate calculus, probability distribution, probability optimization, the chain rule. Again, how much? Can you solve the current problem you're working on? You'll probably find that 99% of the time you can with code. That's in the engineering sense. If you do want to be an artificial intelligence researcher, chances are you're going to have to know these inside out. So get good at math, read this book end to end, the Machine Learning for Mathematicians book, my favorite resource for learning mathematics for machine learning. Here you go, some of the things we've just talked about, mathematical foundations. You've also got the deep learning book, fast.ai: Deep Learning from the Foundations. And various other resources. So, see the resources branch. Huh. That's math in a nutshell. The reason why I've gone pretty quickly over that is that I'm not taking away from mathematics, but for some reason, the most common question I get is how much math— or one of the most common questions I get— how much math do I need to know? They're scared of learning math because some high school teacher said they were bad at math, or they didn't teach it very well, and they didn't tell them that math is actually the language of nature and it's actually beautiful. Once you start to get into it. They look at the Greek symbols and they're like, "Wow, I can't do all this," but you actually can. So my approach is to start learning code first and then learn math when it's required. So if we come back to the keynote, these are the topics that you're generally going to touch on. If you want an overview, again, just read the Wikipedia page for each of these. Even if you don't understand it, over time you'll start to get used to seeing these different terms, these different symbols or whatever, and you'll go, okay, I'm reading this machine learning document, and suddenly the Greek symbols don't look too out of place because I know that under the hood all this code that I'm writing, all of this machine learning code, is actually just executing mathematics for me. Wonderful. So let's go into the final Step number 5, everyone's favorite, machine learning resources. So you might be thinking, let's come back to the roadmap. We've gone through problems, we've gone through process, we've gone through tools, and we've gone through the mathematics, or at least just covered each of these in a high-level overview. You might be thinking, this is great, Daniel Bourke, how do I learn all these things? Well, Well, let's go through that now. So, let's click here. Whoa! Boom! This is a pretty big dog one as well. Now again, we've got here. Note: There's a lot here. My advice is each of the resources are great, but you can't use them all. Choose a couple. Start with beginner if you're a beginner. Explore. Figure out what suits you and doesn't. That's pretty poetic, right? You might like the videos instead of books, but eventually you will have to learn to love reading. Because put it this way. There's only so much videos can cover, but books, you can have a 700-page book like the one I'm holding in my hand right now that you can't see that says Hands-On Machine Learning with Scikit-Learn and TensorFlow, Keras and TensorFlow. To turn that into a video course would be hundreds of hours. So learn to love reading. And often the latest and greatest research is published in text form, not video form. If you're just getting started, accept the materials here to be plenty enough to keep you content for 2 to 3 years. The equivalent of an undergraduate degree. Now I'm being serious with that. You'll probably see a lot of things online like learn machine learning in 6 weeks. Sure, you can, you can learn the overall concepts, but if you want to get really serious with it, you'll probably realize that once you get into it, machine learning is not just about learning models. The majority of machine learning problems are actually infrastructure problems. So software engineering meets machine learning, and we've covered a few things on software engineering meeting machine learning. Remember, that's called MLOps, so make sure to check out that blog post on MLOps. But without any further ado, let's get into machine learning resources. So if we come back, I've actually made another little, uh, cool graphic where to start learning. Oh, look at that, that's pretty cool. So if you're an absolute beginner, expect this little flowchart here to take 3 to 6 months. If you're an advanced learner, you've got some familiarity with all of these, go through something like this. Expect this to take 6 to 12 months plus. Remember, there's no rush here. All right. If you're learning something worthwhile, it's going to take a while. Now, the bonus you can sprinkle in, the only limit here on time is how much effort you put in. So, me personally, I can't really study more than 4 hours a day. After that, I've kind of found out that's just my limit. My brain starts to go to mashed potato. So yeah, 4 hours per day is kind of what I've modelled this off. If you can do 2 hours, you're probably looking towards the latter end of this and maybe a bit more. If you can do 4 hours, you're probably somewhere smack bang in the middle of both of these numbers. Anyway, while you're doing that, it would be a good idea to start sprinkling in some of these. So this is a missing semester, the missing part of your computer science degree. This is going to teach you this little curriculum here. Will teach you a lot of the little parts that machine learning courses tend to miss out on. And that's some, just some computer science things. You'll probably also want to choose one cloud provider that you get familiar with because as you might have seen before in my Airbnb project, because I knew how to use Google Cloud, I could get that, my, my code out into the world. That means someone could access what I've done in a web browser. Now, if you want to learn web development, freeCodeCamp is probably one of the best resources online. Khan Academy, which is great for math when needed. If you want to figure out or find state-of-the-art research, you probably want to visit arXiv. That's all the technical papers of computer science, physics, mathematics, and all that sort of stuff. And if you want to version control your code, which is where you save the code that you've been writing to multiple versions, so if you code on day 1 and it breaks on day 2, you can revert back to day 1. But If you want to add a book to this, I would highly recommend Part 1 of the Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow for this little beginner section, and Part 2 for this advanced section. So what you might do is— let me walk you through this— you might go machine learning concepts, get your mind ready. We've covered a lot of the concepts in this video, and there are plenty of resources linked to the roadmap. So go through some of the concepts, You're going to learn these tools: Python within Jupyter or Google Colab. So Python, NumPy for numerical Python. So remember, machine learning is turning data into numbers and manipulating those numbers. A lot, a lot, and I mean a lot of data processing, of numerical processing, is based on how NumPy processes data. So that's why it's worth knowing. Pandas is going to help you manipulate structured data, so like tables and Excel spreadsheet type data. Scikit-learn has got a whole bunch of machine learning functionality and machine learning algorithms built in that you can use. So this is at least 6 months' worth of work. At the end of this, you want to build a milestone project, at least one, and that's with Streamlit. Of course, it doesn't have to be with Streamlit. I'm just recommending Streamlit, what we went through before, because it's actually a beautiful tool and just allows you to get some experience writing Python scripts. So definitely check out Streamlit. Remember, this is like 4 hours a day. So if you can't do that, just extend this time frame. Now, advanced, I'd recommend something like this. So once you've done all this, go through Fast.ai Part 1, TensorFlow in Practice from, from deeplearning.ai. After you've done those two, you can do those two in parallel. Do these two in parallel. Then you want to check out Full Stack Deep Learning. Which is building a machine learning model and bringing it to production. There you go. Learn production-level deep learning from top practitioners. That's what's up. Then you got a milestone project too. So these are probably the two most important parts. Now you don't necessarily have to wait to do these until you've learned some of this. Like you could do these as you're working through these, like your whole learning journey could be purely Just building projects. That's actually what I'd recommend. And at the same time as while you're going through this, read Part 2 and then sprinkle in these. And reason why I say sprinkle in is because it's hard to really know when you're going to need which parts of these. You're smart enough to use your own best judgment as to when you might need some more computer science knowledge, when you might need a cloud provider. And again, if I'm saying these things and it sounds like, whoa, Daniel, you're going way too fast. This will start to make more sense once you've gotten hands-on. There is no way that you're going to know what you'll need from here until you've gotten hands-on. And then if you want to learn this, this is a plug for my machine learning course. This is what I teach in deeberg.link/mlcourse. Andrej teaches the Python part. I teach the machine learning part. So the machine learning concepts, the machine learning tools, and Andrej going to teach you the Python part. So that's my business partner, and if you want to learn this beginner step, check this out. We designed it specifically for someone who's brand new to machine learning and wants to get started with, with all of these tools. These resources are actually also all here. So if you want concepts and processes, these are all free. Elements of AI is actually really cool. All of Google's machine learning course is open source and free. I mean, this is what's up. If you want to learn these things, the resources are there. So look at that, Machine Learning Crash Course with TensorFlow from Google. So if you don't even want to take my machine learning course, just take Google's course. I mean, there you go. Google's AI for Education, Facebook's Field Guide to Machine Learning. Facebook also do some massive amounts of machine learning. Oh, Made with ML topics. You'll also want to check out this. This is one of my favorite new websites for machine learning. Made with ML. Check this out. If you want to learn Python, it's got a whole bunch of topics where you can learn Python. If you want to learn TensorFlow, it's got a whole bunch of machine learning basics, tutorials, hands-on machine learning algorithms, linear algebra, linear regression, decision trees, convolutional neural networks, transformers. Attention, text classification. Like, these are all like subsets of machine learning. Computer vision, natural language processing. So definitely check this out. There is no shortage of resources on all of this stuff. The best way to do it, full stack. There we go. Boom. Full stack APIs, Docker, web scraping. If you wanted to collect your own data, you probably look into web scraping. I mean, this is phenomenal, like a phenomenal resource. But as I said, it will require you to choose something. If you're in doubt of what to choose, choose anything and just go with the flow. Follow your own curiosity. That's how I always advise people to follow your own curiosity. And then if you've got some skills, you can test them on workera.ai. Whoa. Sounds pretty fun. Standardised tests for AI skills. So, take the test. This is after you've been learning machine learning for a while, or AI, or whatever. You can sign in here. I think I have an account. Anyway, you take some tests, it evaluates your skill levels on different things. And if you want to, you can check out how to boost your skills, prepare for the machine learning test, prepare for the deep learning test, the data science test, figure out if you know about machine learning algorithms. Figure out if you know deep learning algorithms. Look at this. Amazing. So learn some stuff from Made with ML. Go through these topics and then test your skills on Workera. And then the real test of skills is actually not even any type of exam. It's actually what you've built. Woo! I'm on fire here. You enjoying this? Leave a comment below. Let me know if you're enjoying this. Because I'm having an absolute blast here. I hope you're finding some value out of this, by the way. I tried to put as much in here as I could, so it's just like a really just a one-stop shop for getting started with machine learning. Beginner. If you're completely new, start here. There we go. If you're completely new to machine learning, start by learning some Python code first. Okay. And then if you want to learn Python code, you can learn Python in one video on YouTube by FreeCodeCamp. You can do the Zero to Mastery Python course. So this is full-stack Python. Taught by my business partner Andrej from the Zero to Mastery Academy. Look at that. See, Zero to Mastery Academy is— this is a big disclaimer. I'm part of this, right? So Andrej, there we go. He teaches the Python part of the machine learning course. But this is just to show you resources of where you can learn these things. You don't even have to use anything by us. There is so much out there. You got Python Like You Mean It. Which is more Python but for numerical computing. So like STEM applications. There we go. Data analysis, machine learning, numerical work. If you want to learn Python specifically for these type of things, you probably want to go through there. Anyway, tooling. You will need some tooling bare bones to start writing Python code. So you might want to look into Anaconda or Conda or Python Virtualenv for managing all of your Python code. Jupyter Notebooks is where you write and explore machine learning code. If you want to learn it all in one place, the Zero to Mastering Machine Learning course. If we go here, again, massive disclaimer, this is what I made. We've got all these topics in here. You'll find that on the Zero to Master Academy or on Udemy. You can also go to the Kaggle Learning Center, Faster Data Science Education. I'm pretty sure this is all free. DataCamp, DataQuest. Now, if you want example projects, once you've got 3 to 6 months plus of beginner work, the next step is to go to the advanced path. So if we go here, you want to also have done— I can't stress this enough— a milestone project. No matter what an instructor, including myself or including anyone from another course or whatever, no matter how much they tell you about these things, including this video, it won't matter until you put it into practice. I was going to say into project, but that didn't really make sense. Remember when your parents told you that the stove was hot? I'm sure. How many times? Mother and dad or mother and father or whoever looked after you when you were growing up? The stove is hot. The stove is hot. Don't touch it. How did you figure out that the stove was hot? You touched it, right? You touched it. You found out it was hot. Didn't touch it again. So this is what a project is. These concepts here are the equivalent of your mother and father telling you that the stove is hot. The project is you touching the stove and figuring out, okay, you've told me all these things, now it's my turn to touch the stove. So once you've done some beginner stuff, come into the advanced, have a look at some end-to-end projects, what they look like. This is probably— before you got into the advanced stuff here, this is probably what you'd want to be working on is some projects like these. So here's an example binary classification project that I did, which is the heart disease one. If you can like look through this or, or run the code through all of this, going through the beginner path and understand it and write it yourself, then you're ready to go on to the advanced. And now I'm scrolling through this and there's a lot here, but as I said, remember, this is a 3 to 6 month journey. To get from zero to going through all of that, minimum. But then you'll probably want to go through deeplearning.ai's curriculum, the fast.ai curriculum. Remember, you can go through these simultaneously. After that, you want to look at Full Stack Deep Learning, aka don't let your models die in Jupyter Notebooks. Get them live into people's hands, see what you can do with machine learning. If I had my time again, I would go projects first. Don't get obsessed with the latest and greatest tool, just build something that that brings value to someone, to anyone. And then at the same time, I'd probably get proficient with at least one cloud service. So again, choose one of these to get proficient with. Finally, what's missing from machine learning, most machine learning curriculums, is general software engineering practices like Docker, missing parts of your CS degree. If you wanted to go really, really deep, you could teach yourself computer science at teachyourselfcs.com. Then we had the mathematics, so linear algebra, calculus, matrix manipulation, neural networks, probability, statistics. If you wanted to learn something from all of these, you could go to the Essence of Linear Algebra page, Rachel Thomas's Computational Linear Algebra. This is linear algebra with code. Let me put this here. Rachel Thomas, computational linear algebra. Add link. There we go. See, this is a living and growing document. So if you want anything added, let me know. Python, if you want to read some books on it, try Automate the Boring Stuff with Python. Here are some of my favorite data science books. Machine learning practices and code. Cannot recommend this book enough, Hands-On Machine Learning with scikit-learn and TensorFlow. I've literally got that sitting right next to me. See, there we go. You last purchased this item on 11th of April, 2020. Deep Learning for Coders by the fast.ai teachers Jeremy Howard and Sylvain Gugger. That's coming out in July 2020. So this is actually a preview of this book. Look at that. You come to this video and you get all these things that aren't even out yet. Come on, Daniel. Building Machine Learning Pipelines. This is more of a full-stack machine learning stuff that's actually coming out later this year too. So stay tuned for that. Interpretal Machine Learning. So that's explaining why your machine learning model is making the decisions that it's, it's making. Mathematics. Now the number 1 book, we've already covered this, is Mathematics for Machine Learning. Read that end to end if you really want to get an overall concept. You can also get, if you just want the bare bones matrix calculus you need for deep learning, you've got this, this book online by Jeremy Howard, who's the fast.ai instructor. So if you come through here, when you first read this, you're probably going to look at these Greek symbols going, whoa, that's a neural network there, and going, whoa, what's happening here? What is that? What is that? But as you start to read through this, you'll start to see— there we go— power rule, sum rule, difference rule, product rule, chain rule. You'll start to see, okay, I can start to piece together these different bits, and I can start to read these heavy equations and go, yeah, okay, they're starting to make sense. Now, truth be told, if you ask me to go through this and read it all, I probably can't. What it takes me is instead I have to revisit these and learn these things as I go as well. So if you're, if you're watching this video and thinking that I'm some sort of expert on all of this stuff, please don't get too far ahead of yourself. I'm still learning all of this as well. If you want to learn a cloud service, A Cloud Guru is probably one of the best places to go. I've done a few courses on there, especially getting certified with Google Cloud. Highly recommend that. And then Google Cloud, if you want to learn that. AWS, Microsoft Azure. Remember, you only have to really choose one of these. Some rules and tidbits. Oh, these are my favorite kind of articles, actually. Andrej Karpathy. He actually did that Tesla Autonomy Day talk that we, we referenced at the start of this video. A recipe for training neural networks. Now, every so often, will get blessed with the privilege of finding one of these amazing blog posts by a practitioner. So this is why my advice— look at this, where's number 1? Become one with the data. That's step 1 in back over here in our machine learning process. In data preparation is exploratory data analysis, learning about the data you're working with. So coming back to the blog post, every so often we'll get blog posts like Andrej Karpathy's Recipe for Training Neural Networks, Practical Advice for Building Deep Neural Networks. We'll get things like these. And now, although you might be thinking, well, these are just blog posts, they're not really like hard rules, but what did I say all throughout this video is that machine learning is experimental. So It's only really after trying things a lot of times that you start to realize, okay, this works, this doesn't work, this works, this doesn't work. And so every so often we'll get blessed with a beautiful blog post like this, and my advice is always create your own blog. Yes, you should have one. Now if we come up, have a look. You should read this article by Rachel Thomas, Why You Should Have Your Own Blog. But one of the main reasons is that so you can craft these beautiful blog posts. And now I'm not asking you to write a blog post like Andrej Karpathy for training neural networks. This took probably 10 years worth of experience to write something like this. But write something for yourself 6 months ago. If you've just gone through this beginner pathway, write the things that you've learned, or what's wrong with this pathway. Did I do it wrong? Or if you'd like to have known something when you started learning machine learning. Write about it. Because truth be told, there's enough resources out there for learning the code and whatnot. What there isn't enough resources out there is for the process around learning these topics, for the process around the bits and pieces that aren't just code, like just the general how things fit together, like this machine learning mind map. So write things like that. Help your previous self. And what you'll be surprised to find is that A lot of people probably have the same questions that you do. So, if you want to create a blog, try FastPages or GitHub Pages or Medium. There's a whole bunch of different resources that you can try. But what writing does is it shows you how poor your thinking is. So, when you think you understand something, try write about it and teach someone else about it. That's when you'll really start to understand it. So, bookmarks. Archive Sanity. So if you want to look through the latest machine learning research, check out this little tool. Helps you weed out some of the best stuff, some of the most popular stuff. Made with ML. So this is a community-driven resource for your projects. We've actually just been through that, but if you do make a machine learning project, you should definitely post it there, whether it's something as simple as a blog post of 10 things I learned in my first machine learning course. Should put it there. Or whether it's something phenomenal. I'm not saying that 10 things I learned during my first machine learning course isn't phenomenal, or whether it's something crazy like I turned my car into a self-driving car. You should put whatever you're doing, put it there. Everyone has to start somewhere. I cannot stress this enough. So we come back to the keynote. Where are we up to? Oh, example curriculums. Before we finish off the tools, if you want to figure out, or if you want to teach yourself machine learning using something like we've covered up here, the beginner or the advanced, I'd highly recommend you check out these two posts. This is by yours truly. So I'm pretty biased in that one, but you can see how I kind of developed my own machine learning curriculum, Study Machine Learning. And you can read Jason Ben's post on How I Learned Web Development, Software Engineering, and ML. I'd actually, I'd actually favor his truth be told. Like if I was starting again, I'd do it something like this. So check out this article and I'd do something more like this, but I'd construct it in the style of mine because I actually just tweeted out something today. If we go Daniel Bourke Twitter, here we go. How I'd learn machine learning in 2020. 80% software engineering, web development. B, machine learning, 20%. If you're interested in building things, B doesn't exist without A. So, I'd learn how to build software products and then add machine learning in later. So, that's how I would do it. But yeah, check out those posts. This one's a really great one. And then you can also check out my style in terms of how I would design actually creating a curriculum. That's actually a cool startup idea, a cool product idea. Is being able to create your own learning curriculum using resources online and then potentially get in other students who want to do a similar approach and teach themselves. And you kind of have a community around learning the same thing. That'd be pretty cool. If you build that, let me know. So that's an example curriculum. The next one was some useful places to visit. SotaBench, Papers with Code, Made with ML. So SotaBench is where you're going to find all of the state-of-the-art machine learning models benchmarked on a number of different datasets. Papers with Code is where you'll get the latest machine learning research with code attached, usually. So although it's called Papers with Code, I think one of the criteria actually for something to come up on Papers with Code is that it has to be a research paper. So like state-of-the-art machine learning, but with code. But don't get too distracted by these. You want to build things with machine learning, and that's where you can find on Made with ML. Yeah, there's Papers with Code, there's SodaBench. If you want some datasets to where to find different data sources, if we come back up here, back to process, one of the, the steps in machine learning is data collection. So one of the ways that you can collect data is through existing datasets. So Google Dataset Search, Kaggle datasets, A curated list of free datasets by Dataquest. If you have anything else that you want to add to this, please let me know. Cool resources. How do I actually learn all of this? Now I'd highly recommend go do the Learning How to Learn course on Coursera. That'll basically teach you how to learn. Or there is actually on Zero to Mastery a Learning How to Learn course by Andrei. Where is it? There we go. Learning to Learn, Zero to Mastery. If anything, out of all of these courses here, even my own, I would say do this one first and then do something else. So if we come back here, read this article by yours truly. This is what helps me study machine learning 5 days per week. And then if you want to create your own curriculum, as I said, this is my self-created AI master's degree. But if I was to do it again, I'd probably do something more like this by Jason Benn. And as in learning machine learning plus software engineering plus web development. So these two software engineering and web development are basically all about getting things into people's hands. Whereas a lot of machine learning is about building proof of concepts. But for me personally, I want to get things into people's hands. So that's where I'm going to be spending a lot of time in my next learning journey is software engineering and web development. But if you want to go into just pure like AI machine learning research, you'll probably just want to go full-blown ML and lots of mathematics. So I think we have actually come to the end of the roadmap, but it's really not the end of the road, is it? Let's go back to the keynote. End. Summary plus next steps. What we've covered. Did you like that? I kind of did a little artistic title there. And crossed out that bit. So what we've covered broadly, we started with machine learning problems. What does a machine learning problem look like? We went through the process of how you might go about trying to solve one of these problems. We then looked at the tools of what you should use to build your solution, which is kind of an endless list at this point. Then we figured out the machine learning mathematics, or at least just covered the names of the different things. Remember, the knowing the name of something is not understanding it. That's what's happening under the hood of all the machine learning code that we write. It's a mathematical problem. And then we have machine learning resources. So all of this is pretty cool. How can you learn all of it? Well, that— we saw that, we saw that there's an abundance of resources online. You can actually create your own curriculum if you really wanted to, and you can, with some effort, go through learning all of the things that we've covered. And how I recommend when you're first starting out Be a cook, not a chemist. Don't go for exact things, like explore things, follow your curiosity. And then as you start to learn more, slowly fade towards being a chemist and making sure that what you're building is solid. What's missing? Instant first model-based learning. There's another type of learning that we kind of didn't cover. We could have actually covered that. It's not too, too difficult, but that's all right. Machine learning pipelines still emerging on best practices. More specific topics such as computer vision, NLP, and RL. We kind of did hint on these, but I kind of wanted to cover the real foundations that you'll find across the majority of machine learning projects. And then of course, probably much more. So leave a comment anywhere that you can leave a comment. If you'd like something to be added or if you think something should be corrected, please let me know. Sources. So there definitely has to be some thank yous and rounds of applause. That emoji up there was like a little trigger for me. Daniel Fumoso's Machine Learning Mind Maps. You should definitely check those out. Hands-On Machine Learning book, second edition, is where I got a lot of these concepts from. Same with the 100-page machine learning book and countless blog posts. Check the mind map for all of the links. So I believe that is it. The machine learning roadmap for 2020. We have a lot of different branches here. So my challenge to you is to explore, to leave a comment, to even make one of your own if you want to really start diving into understanding what's happening with machine learning. Try to go through some resources if you want to learn. Try out a few of the tools. See if you can start to diagnose machine learning problems. See if you can start to theorize what steps— like, if you have a problem, what steps might you need to take in that project? And then when you're ready, start approaching the maths, because after all, that's what's happening under the hood when you write machine learning code. Keep learning, keep creating. Oh, and, uh, machine learning, that is. So thank you so much for sticking around if you're all the way to the end. I hope you had a lot of fun. I had a lot of fun. See you next time. Oh, I think I need a nap after that. What a ride, eh? We covered a fair bit, and that's, that's a really important point there. Because we covered so much, don't expect to know it all in one hit. I mean, I put it there, and as I was putting things out, I was finding myself relearning them as I was connecting the dots. So that could be a really good practice for yourself, is to play around with the roadmap and then potentially create one of your own so you can connect the dots in, in your own mind and visually. I like to see things visually laid out. But most important point, all the resources you need are in the description below. Check those links out. If you have any other questions, leave a comment and I'll get back to it. Otherwise, I said in the video, I'll say it again, keep learning— machine learning, that is— and keep creating. I'll see you next time. Peace.
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


