2020 Machine Learning Roadmap (still valid for 2021)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you can't tell I'm so so so excited to be able to share this with you now I'm not gonna hold you for long I just wanted to 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 road map itself there's the github repo to go along with it which has a full version image of it the most up-to-date link will be the map itself there's also the 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 point set that suit you best and if 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 alright alright or I welcome some machine learning roadmap for 2020 aka a machine learning flavoured visual interactive living my map slash 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 got some nice icons we've got a little white box with machine learning in it and so what we're gonna 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 text books have been written on machine learning of course but that's not what we're here for we're gonna go through some of the main topics of machine learning such as machine learning problems the process aka the steps and 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 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 what it's going to expand out look at that far out we're gonna 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 well let's get started what I've got to go along with this is a little presentation so what we're gonna 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 gonna treat machine learning as turning things a KA 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 line a 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 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've got a blog post here I sometimes see people refer to neural networks it's just another tool in your machine learning toolbox nor 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 road map 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 you say you've got your box of vegetables and the raw chicken you might program these steps you might go step one cut the vegetables step two season the chicken step three get the oven preheated what temperature who knows that's up to you there 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 I'm shayne 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 a hundred or a thousand 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 the 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 on 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 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 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 now 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 a thousand 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 a thousand 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 real one of Google's machine learning handbook which if we come back to our road map will 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 Oh actually there's something in here that's supposed to be machine learning rules machine learning 101 I should have given that something better machine learning 101 I'm gonna put in brackets here machine learning rules see this is a search problem model a machine learning what I want actually forty three 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 one don't be afraid to launch a product without machine learning as we talked about before software 1.0 aka 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 one 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 across 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 to continually changing environments so again with the self-driving car the reason why I use such open cars it's fairly easy to imagine these kind of scenarios if you were driving along you're 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 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 are now I mean that's probably not a good example because apples pretty big on privacy and they don't like collecting that sort of data but maybe they will analyze it without having your specific user ID in there so again if you try to discover those insights within let's say you had an imagined 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 before they 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 the data this 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 there 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 eight 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 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 may be 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 will 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 eight 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 texts 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 and a tesla car 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 one we're gonna 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 three 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 I'll if a chemist if you imagine is really really specific going through all of these things we're not going to go through it and chemists are 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 gonna cover these topics broadly we're not gonna 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 know justice instead what I will continually emphasize doing is actually on the next slide is how to approach this roadmap the number one thing to do is explore number two is to comment on this video or on the roadmap itself to give feedback what's missing from it because of course learning's abroad filled 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 in research and upgrade my own knowledge and finally we've got explore again and I put it there twice on purpose because that's what I want you to do is explore so in fact you'll probably realize that this is not a road map essentially telling you where to go it's more a compass giving you a little nonlinear 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 out machine learning roadmap reset and we've got five major branches here that we're going to go through and we've got our little counterpart presentation number one 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 one 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 it's putting the cart before the horse this is probably a 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 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 figure on 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 four 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 road map oh I'm so excited you ready let's expand it here we've got 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 road map we've got machine learning problems I 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 some 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 balance class problem often times and machine learning actually you'll have nine thousand nine hundred and ninety photos of cats but only ten 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 2 for example if you have 10,000 houses in 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 gonna read out all of these is what I want it to be is like kind of just a bouncing back and forth and Throop ewtodd you could probably tell I haven't scripted this so I'm kind of just talking 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 in forty nine thousand nine hundred ninety seven of them are similar but three of them are completely outlandish this kind of problem is called anomaly detection other common problems include clustering and dimensionality reduction and you've got reinforcement learning actually I could put a link for all of these can 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 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 data set 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 our classification regression clustering and dimensionality reduction again you could divert these into more things but chances are if you figure out what actually this that 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 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 prices 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 so you had a whole series of transactions or a whole series of people listening to your song say for example your 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 rates too high they've probably got heart disease and so we actually don't need that wait 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 multi class class vacation so that was binary if something is one thing or not multi-class 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 a hundred and twenty 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 okay tensors we picked a model from tensorflow hub we'll see what that is in a moment in another section in 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 evaluator let's see if it was good or not then we improved it through experimentation and saved and reload a 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 this is 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 the 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 data school don't I owe another amazing resource this is a simple guide to confusion matrix terminology okay well we read through this ok this is a confusion matrix here so the number is 165 the number of total things alright 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 two 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 saying 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 and 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 bitcoins 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 bitcoins price something like this and see okay well on June 29th it was 13,000 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 25 it was thirteen thousand five hundred and fifty-two dollars 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 eg if trying to predict 100 predicting 99 is the same error as predicting 101 where a squared error it makes the outliers stand out more that means if being 10% off is more than twice as bad as been 5% off you probably want to pay more attention to mean square error again we've got some links here whoa 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 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 translated 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 amour tanto el el friends observe a automaticall 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 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 user patterns in those numbers so turn all of English into numbers turn all the Spanish into numbers let a machine learning model figure out the patterns I'm more than happy to use those pattern 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 may be 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 key note here what are we up to next machine learning process alright let's dive in now this is probably the biggest part of the entire road map 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 well 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 a ride down here choosing an algorithm or actually before that we've got trained model on data which can be broken down into three 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 models potential for learning patterns and data to hold it back so that it can adjust itself to new data and then if we come down here whoo 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 cuz they're to take way too long but we're just gonna 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 six different subtopics well that's all in one little beautiful colorful chart here we got data collection will ask questions like what data exists where can you get it is the data public are there privacy concerns is it structured or unstructured what I mean by structured or unstructured is imagined 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 machine learning model wouldn't be a don't 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 pre-processing 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 trainer model choose an algorithm over fit then regularize tune the hyper parameters 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 okay 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 gonna 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 okay a thought of whether it's a classification task or 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 one 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 column star 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 color 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 a hundred and seven thousand eight hundred fifty dollars it'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 fifty six thousand four hundred 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 one week one month there we go so that's over a time period we come back Navan got another type of data which we touched on before unstructured data so data with no red 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 problems same thing with playing the voice back it takes a sequence and then plays the voice back in a sequence of sound waves well I just really confuse myself there with them with my word saying sequence so many times but you get what I mean you take one sequence of words Soundwave generate that into text and then two 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 because we don't just want to be jumping through all these little tentacles here we come back to our Tesla data collection and model training little data engine here and now how might this fit in to this machine learning process and got data collection preparation trainer model analysis evaluations serve model retrain how might this fit in so if we put that back on the screen when different so let's have a look at data collection we might have a data source well 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 it's really 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 let's say 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 what are the first steps you might do in data preparation is 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 general 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 gonna look when it's been 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 vegetable sauce from Blue Mountains and all that sort of stuff or really you can 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 there 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 a classification or is it regression trying to predict a number if you guess classification ten 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 H R now is that ours how would someone else know that it actually means heart rate so these are the things you might line up let's go Cagle now Kaggle is another beautiful website for data sources and actually you can learn a lot from goggle 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 P class someone sex their age what now what is SIB SP I don't know what sub s peers but if we come to look the definition is the number of siblings spouses aboard the Titanic okay now I'm just trying 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 three plus 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 out lies is to plot a histogram plot a distribution of your data if you're not sure what that is I'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 with a heart disease physician be able to shed some light on your heart disease to ever set 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 pre-processing preparing your data to be modeled whoa 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 feeling 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 six different ways to compensate for missing values in a data set then you might want to do feature encoding so once you've filled your missing values in a data set you typically do this with structured data by the way future encoding is turning your data set into numbers our machine learning model requires all values to be in America no matter what you're trying to model whether it's tags whether its sound waves whether it's images it has to be in some form of numerical form then you've got one hot encoding and 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 one and five and the size of land and size of all may weaken 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 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 & 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 new 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 future 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've got different things like decomposing turning a date such as imagine you've got this date here it looks like that 20 2006 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 twelve thousand nine hundred sixty three dollars on June 15 maybe June fifteenth 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 data set then you've got die cracked ization 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 is 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 also selecting the most valuable features of your data set to model remember before when we remove 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 whoa they do not occur so basically high dimensional spaces just means lots of different data like lots of different features that do not occur and low dimensional settings such as a three 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 teapot does this I love teapot 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 a hundred 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 people being nice because generally people are pretty nice but you might have a hundred examples of people just being toxic idiots and you're trying to build a Twitter classifier to go what this tweet is nice or these a hundred 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 and people are pretty good now that's data pre-processing in a nutshell so if we come back where were we in their 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 pre-processing steps would be to collect more images now this is through an analysis and evaluation remember this a continuous process maybe they trained to 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 three sets the training set which is usually 70 to 80 percent of the data so the model learns on this the validation set typically 10 to 15% of the data the model hyper parameters are tuned on this now if we imagine back to our cooking example at the start hyper parameters 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 percent 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 models final at 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 form in the real world do not use this data set to tune the model I can't stress that enough keep these separate from each other whoo so that's data preparation and let's go here now we've got our date already how do we train a model remember the three steps choose an algorithm over fit the model so meaning that it's actually learnt - well it's learn two patents - 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 and type in what is regularization boom you'd be amazed at how far you'll get by just reading the top three links and damn'd 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 again ah the second time you read it it actually makes a little bit more sense anyway step one choosing an algorithm how might we do this well give you one great example choosing the right estimator you might look at this and go whoa that child 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 don't you sang 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 rez Nets 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 where we 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 100 K samples so we might gonna go a linear SVC or you can actually try each of these the green boxes are machine learning algorithms where we go here and solve all classifier my favorite is the random forest forest of randomize trees there we go now if you've never coded before you might look at this and go well what's going on here but let me just talk you through this you've got from scikit-learn ensemble so psych it loans 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 they're 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 0 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 enough 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 ten different models in our CLF and then run 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 gonna 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 use before it's trying to put the cart before the horse so see if these are 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 or fancy word dot product between weights and inputs and nonlinear functions activation function hmm what's that well that's where you do use 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 Oh so once you've chosen an algorithm there we go this is a little bit of tidbit every learning algorithm has a loss function and optimization criterion and optimization routine once you've chosen an algorithm type of learning now how does the algorithm actually learn on your data set 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 loans 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 data set 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 eight cameras it's got 25 cameras so they may take their entire data set 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 tracer learning gives you the ability to leverage SOTA by the way you're gonna see the acronym SOTA a lot in machine learning research it's just means state of the art so the results your machine learning model are getting a state of the art on a certain problem this is helpful if you don't have much data or vast compute resources so you use the following resources for different transfer learning models tensorflow hard part to a child hugging phase transformers detector on - 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 and the loop maybe 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 ensembl ambani different algorithms together a random forest is an example of an in sambal 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 nine under people they might say left so should you trust the nine 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 so 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 percent 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 data set lower is better starts to increase hmm or if you don't have a validation step happens when the model performs far better on the training set and 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 then 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 lassoo and l2 Ridge regularization drop out so drop out it's 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 of validation law starts to increase much more data augmentation batch normalization again these things I'm gonna be saying them to you but I'm kind of just 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 ok I know where drop out fits in now I know where data augmentation 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 hyper parameter 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 chew so with a machine learning model you typically have parameters such as a learning rate which is often the most important type of parameter 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 got we've already said batch size number of trees number of iterations and many more a tip for for tuning hyper parameters as if you're wanting between our parameters try just searching for the algorithm name such as random forests hyper parameter tuning and so if we look at this paper a disciplined approach to neural network hyper parameters let's click this one so this is the kind of thing the resources that you'll come across this is archived 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 - parameter maybe 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 three of these boxes over here so then we've got a total of what there's one two three four five six seven eight nine maybe we three boxes over here to find more patterns in data and then we've got twelve boxes so now our machine learning model is actually comprised of twelve 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 you cut this off here and we only use six layers so that is a form of hyper parameter tuning any setting that you change on a model by hand is a form of hyper parameter tuning so we come here this is what a research paper looks like pretty cool Hey so a disciplined approach to neural network high parameters so if you read through this although deep learning has produced dazzling success for applications of image speech video processing what does it say here most training are with sub-optimal hyperrealist C requiring unnecessarily long training times so in the case of cooking our chicken and uh knock demised hyper parameter setting might be an oven on a hundred degrees so that's gonna take far too long for our chicken to cook so the ideal setting a machine learning algorithm might have by default 100 degrees as it's fitting we might actually need 200 so that's what hyper parameter tuning involves is finding the right settings for your model now I will give you a little tidbit as well usually with the machine learning model hyper parameter tuning doesn't play as much as apart 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 / 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 cost involved with that for example with the Tesla example well 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 V 100 that's actually a really fast GPU let's say there we go P $101 46 so if we did 146 times if we want to rent that GPU for 70,000 hours that's going to cost us a hundred and two thousand dollars two hundred 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 percent accuracy but costs a million dollars to train and you've only got a budget of two million dollars well you're not going to be able to train very many models an inference is how long does a 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 ten seconds to make a prediction do you think that's going to help right the cars 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 ten 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 let you check out that that's a big thing about machine learning is explained ability least confident examples what does a model get wrong the bias and variance trade-off so high bias results in under fitting remember we talked about under fitting 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 and numbers but sometimes they're so good they can find patterns in what is just random noise in data so that's some analysis / evaluation now finally we got served 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're prepped it you trained your model you did some analysis such evaluation you've even you've even got some new samples here that that won't very good and you've retrained a 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 it'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 Jupiter notebook your model gets 99.9 percent accuracy and whatever problem it's working but when you put it into an application everything starts to change because you're gonna 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 if chances if you're watching this video in a few months these might be outdated but right now intensify serving is gonna be really good pi torch serving google's AI platform you can make your model available as a REST API sage maker which is Amazon Web Services machine learning deployment tool and then you've got ml ops which is kind of this seeing which is if you've heard of software engineering DevOps ml ops 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 human 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 it's 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 models 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 cameras 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 a model if we come back that's an example of how Tesla would do it now I actually do this in one of my own projects about a month or so ago I collected some data from open images which is a data source I pre-process it or actually sorry I used a Python script download it I stored it in Google storage I prepared the data with a Python script I trained a model using detection to 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 go whoa well Daniel we haven't covered any tools yet don't worry we're gonna get to tools I analyzed and tracked my experiments with weights and biases dashboard I made a user interface with streamlet which is a beautiful tool I wrapped all of this in a docker container push 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 smn2 detection with detection - 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 your Airbnb and you want to find out what amenities aka an oven or a kettle or a sink or a banjo air conditioner or 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 who 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 you want to see how this was done there's a link there debug link slash air B&B playlists whoa 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 actually have long these sections have 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 horse 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 to number three machine learning tools have a little chilly out are we back in a second and we'll go through some machine learning tools that we can use to get the job done all right where were we machine learning tools let's check it out I got here machine learning tools tools you can use to get the job done it might have been a better idea to go in like a nice little circle and do mathematics or whatever next part we're already here boom so broken this one into some libraries so these are pipe and flavored zoom in a little bit they're libraries pipe and 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 Pytor which tend to flow and Python itself actually executes 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 PI torch and tensorflow I mean they have a lot of overlaps but we're getting too deep at the moment let's go 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 code space 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 auto ml and hyper parameter tuning explained ability in case you wanted to get insights why did my model do that certain thing machine learning lifecycle okay ml ops that's probably a better name there user interface design at the moment streamlet it's probably in a class of its own there it's pretty good now if we go through these I'm not going to go through each one of these but this is probably the main stack where you'll be using to write machine learning code right here Jupiter notebooks tend to flow if you want to do tensor flow for the web you'll use since float J s if you want to do tensor flow on a mobile device or like a small computer like a Raspberry Pi you'll probably use since the flow light PI torch is very similar to tensor flow height which lightning is a like a wrapper of Pi torch oh and an X is open neural network exchange which basically converts your tensorflow or pi torch model into a 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 do know 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 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 and tensorflow and you need to track your experiments you might use dashboard by weights and biases and if you want a pre trained tensor flow model you might go to tensor flow 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 collab 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 collab to begin with but then it's very helpful I'll 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 auto ml and hyper parameter 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 auto ml if you just want to prove a concept as a machine learning engineer working as a machine learning engineered consulting to other businesses we would often build small proofs of concept using auto ml 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 cube flow Seldon ml flow 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 Selden'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 streamlet I'm just going to say that a web dashboard that someone can use on their own computer you streamlet 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 flow chart 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 tensor board we're gonna 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 tensor flow I mean tensor board 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 but 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 they've got the best accuracy so I'm gonna click on that one and see what what hyper parameters got that best accuracy Neptune AI similar version is 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 there's not sponsored by weights and biases I do really love the products they're building pre train models so the food 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 rare and rare 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 TF hub 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 PI torch hub now I believe PI torch hub it's not as well refined as tensorflow hub but it's still got some pre-trained pi 2 inch models great offering their hiking phase 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 detector on to is Facebook's open source software there we go Facebook a our research for state of the art object detection algorithms so a lot of computer vision gets done with detector on - 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 data sets that just makes sense right like if you've got the original data set that you've collected and then you make a change on it you've got change one and the model does performance and that you have model one you make change to but then you rerun model one on change - 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 for remember how I said I love weights and biases offering now have a way to version your data set 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 data sets 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 project 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 I 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 and 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 at 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 pop 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 a NVIDIA GPU so there we go now the video kind of have like how do you say monopoly on machine learning GPUs so that's my MacBook Pros GPU if I wanted to use tensorflow or PI torch one of these machine learning libraries it doesn't work without a lot of hacking very well with my MacBook Pros GPU so I need a 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 collab just going to show you the dog vision project that we went through earlier if I wanted to set up a GPU here I can 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 three 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 sage makeup cool name hey machine learning for every developer and data scientist AI platform on GC P which is Google cloud platform it's formerly called machine learning engine or Azure machine learning from Microsoft Azure and 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 dawgs 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 Floyd Hub what's another one gradient paper space there's another one paper space Floyd hub deep learning platform paper space 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 debtor's 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 a 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 Auto ml o 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 or 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 data set why not use machine learning just to build itself that's the premise of Auto amel you can also use that for high parameter tuning so just like we would 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 high parameters 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 teapot we kind of touched on this before really cool piece of software what it does is a nice graphic here here we go teapot 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 sale or spin automated by teapot 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 teapot we'll 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 gonna have to validate it so teapot takes care of all of that that's pretty cool huh Google Cloud auto ml 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 Auto ml 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 gonna have to you don't get to keep the machine learning model if you train it on auto ml that's kind of a common theme with a lot of auto ml services maybe that'll be changed in the future Microsoft have an offering weights and biases again have another offering for scalable customizable high parameter 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 gonna complain are we if you build some awesome stuff you're gonna get popular finally there's carriage tuner probably a few more options here but these are just some of the main ones Chara's is a another deep learning library or framework that is now part of tensorflow so it's quite confusing but if you go to carries dot io you can use carriers on its own simple flexible powerful sounds like me except for simple I'm a complex Bing you can run it on tensorflow too so built on top of tensorflow 2.0 there you go deploy anywhere see 10 to flow and Kara's had a lovechild and if we go back where is it get started up there we go introduction carriage tuner is actually in the tensorflow documentation so this is just going to help you turn your Kara's model if we got got some stuff here we don't have a great but that's alright now once you've trained a machine learning model you won't 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 support a data and task types binary classification we've touched on that multi-class classification regression tabular image this is the explained ability 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 schapp values so that's the other explained ability tool uses game theory to explain the outputs of your machine learning models sharp 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 no more goes you have heart disease and the doctors looking at is like well I don't really have anything else to offer except that the models is the U of her heart disease well you probably want some information to go oh well model notice 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 shock values actually don't produce that but they can produce different things like why a certain feature contributed how much it 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 gonna go through I think mostly just in this stage like this is how I've actually tried to stage a lot of this road map or compass whatever you wanna call it is the branches here in cascading effects 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 ml flow coop flow Seldon streamlet also let's just have a look at one of these also that document that we just had a look at before chip human ml ops 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 that 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 ml flow that's all we're going to look at an open source platform for the machine learning lifecycle ml flow 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's office I mean offering Microsoft Office sage maker we mention that Google cloud kubernetes that's what coop flow is I imagine coop flow 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 eg one container does one thing such as pre-processing data another dozen other things such as model data forget a coop flow the machine learning toolkit for kubernetes this is a lot to take in there again this won't be and 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 I'll put it up here is streamlet or beginner friendly tools sorry I've used this to create proof of concepts so streamlet the fastest way to build data apps look at that so say for example you were 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 used but this is what streamlet 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 look how easy it is to get started pip install stream Lynch streamlet hello there two lines of code that you run in a terminal by the way there we go so if I just ran pip install streamlet I'm pretty sure I've already got it I'm not gonna do that but that's a little challenge for you try that out try streamlet out highly recommend alright ah 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 users 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 attentive flow and then build a model with that and then build a proof of concept with streamlet you'd be surprised how far you'll get with just those tools I mean if you use tensor flow you're probably also going to use tensor board so that's that's probably three and maybe weights and biases for 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 gonna have a little art sip of water as you might have read by this this is point four machine learning and mathematics and this beautiful little abacus emoji there wasn't one for a calculator but that's alright let's have a look now machine learning mathematics these are only some of the main ones and as I said I'm not gonna be going into each of these in depth I'm just really basically gonna be listening 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 has 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 to it 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 1 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 back propagation which is how many neural networks learn basically or improve their errors is through back propagation probability and distributions and then optimization so again when we said finding patterns and 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 a 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 algorithms 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 eg 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 the data set well that's a pretty cool explanation if I do say so myself 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 probably get angry at me for describing these and 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 gonna be like wow that's a lot of things I don't understand but then what you're gonna do is you're going to go three blue one brown linear algebra and you're gonna watch all of these and you're 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've got some code so I'm going to where is it come back here I'm going to copy this and I'm gonna put this in the roadmap linear algebra bomb actually this should probably going resources but that's a 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 can press the knowledge in my own words into a couple of sentences and then start to build upon that now you might be thinking Daniel 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 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 gets often gets turned into rows columns and features features is the third dimension it actually is the N dimension ah which can actually be many dimensions the 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 go to Wikipedia page I read through it I go yeah that's matrix multiplication I try it out for myself so as I said I'm not gonna 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 gonna have to know these inside out so get good at math read this book in to end the machine learning for mathematics 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 faster AI deep learning from the nations and various other resources so see the resources branch 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 again 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 to over you 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 five 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 how do we learn all these things well well let's go through that now it's 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 Explorer figure out what suits you and doesn't it'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 intensive flow care is intensified to turn that into a video course to 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 their materials here to be plenty enough to keep you content for two or three years being equivalent of an undergraduate degree now I mean serious with that you'll probably see a lot of things online like learn machine learning and six 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 ml ops so make sure to check out that blog post on ml ops but without any further ado let's get into machine learning resources so if we come back I've actually made another little our 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 three to six months if you're an advanced learner so you've got some familiarity with all of these go through something like this expect this to take six to twelve months plus remember there's no rush here all right if you're learning something worthwhile it's gonna 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 four 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 four hours per day is kind of what I've modeled this off if you can do two hours you're probably looking towards the latter end of this and maybe a bit more if you can do four 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 free code counts 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 archive 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 one I mean it breaks on day two you can revert back to day one but if you want to add a book to this I would highly recommend part one of the hands on machine learning with scikit-learn care 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 Jupiter or Google collab so Python numpy for numerical Python so remember from scene 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 is got a whole bunch of machine learning functionality and machine learning algorithms built in that you can use so this is at least six months worth of work at the end of this you'll want to build a milestone project at least one and that's where streamlet of course it doesn't have to be with streamlet I'm just recommending streamlet 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 streamlet remember this is like four 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 day.i part one tends to flow and practice from from deep learning today I after you've done those two you can do those two in parallel do these two in parallel then you'll 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 is why you're going through this read part two 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 well 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 debug link /ml course Andre teaches the Python part I teach the machine learning part so the machine learning concepts the machine learning tools and Andre going to teach you the Python PI 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 googles 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'm paint there you go Google's AI for education Facebook's field guide to machine learning Facebook also do some massive amounts of machine learning all made with ml topics you also want to check out 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 and 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 a full stack there we go boom full stack api's doc our web scraping if you wanted to collect your own data you're probably looking to 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 work err Rai whoa sounds pretty fun standardized test 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 work error and then the real test of skills is actually not even any type of exam it's actually what you've built whoa I'm on fire here you enjoy this leave a comment below let me know if you're enjoying this because I'm having a absolute blast here I hope you're finding some value out of this by the way I tried to put as much in heroes like hood so it's just like a really just a one-stop-shop for getting started with machine learning beginner if you completely new start here there we go if you're completely new to machine learning start by learning some Python code first okay then if you want to learn Python code you can learn Python in one video and YouTube buy free code camp you can do the zero to mastery Python course so this is full stack Python taught by my business partner Andre from the zero to master Academy look at that see zero to mastery Academy is this is a big disclaimer I'm part of this right so Andre 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 our 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 tolling you will need some tooling bare bones to start writing Python code so you might want to look into anaconda or Condor or Python virtual M for managing all of your Python code Jupiter notebooks is where you write and explore machine learning code if you want to learn it all in one place the zero to master in machine learning course if we go here again massive disclaimer this is what I made we got all these topics in here you'll find that on there zero 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 data camp data quest now if you want example projects once you've got three to six months plus or 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 stresses 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're 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 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 coming to 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 yeah 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 a heart disease one if you can like look through this or I'll 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 your data and so now I'm scrolling through this and there's a lot here but as I said remember this is a three to six month journey to get from zero to going through all of that minimum but then you'll probably want to go through deep learning dot a eyes curriculum the faster AI curriculum remember you can go through these simultaneously after that you want to look at full stuck deep learning aka don't let your models die in Jupiter notebooks get them live into people's hair and 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 doc are missing parts of your CS degree if you wanted to go really really deep you could teach yourself computer science at teach yourself CS comm then we had the mathematics so linear algebra calculus matrix modulation neural networks probability statistics if you wanted to learn something from all of these you 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 adlink there we go and see this is a living and growing document so if you want anything added let me know - 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 in code cannot recommend this book enough hands on machine learning with scikit-learn intensive flow 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 sylveon Goga 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 - so stay tuned for that interpret all 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 one book we've already covered this is the mathematics for machine learning read that into 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 faster day eye instructor so if you come through here when you first read this you're probably gonna look at these Greek symbols and going whoa that's a neural network there and going well 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 some real difference rule product rule chain rule you'll start to say okay I can start to piece together these different bits and I can start to read these heavy equations and go yeah okay the Sun to make sense now truth be told if it 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 I'm 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 you want to learn a cloud service a cloud gurus probably one of the best places to go I've done a few courses on there especially getting certified with um 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 all these are my favorite kind of articles actually Andre capaci 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 we'll 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 one become one with the data that's step one 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 will get blog posts like on Drakkar parties recipe for training norm networks practical advice of building deep neural no networks will get things like these and now although you might be thinking well this is 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 rogue this doesn't work and so every soft and we'll get blessed with a beautiful blog post like this and my advice is always create your own block 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 Andre capaci for training neural networks this took probably ten years whether experience to write something like this but write something for yourself six months ago if you've just gone through this beginner pathway write the things that you've learnt or what's wrong with this pathway did I do it wrong well 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 what not 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 fast pages or github pages or medium there's a whole bunch of different reasons 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 some 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 mate 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 ten things I learned in my first machine learning course should put it there or whether it's something phenomenal I'm not saying that ten 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 do out that's 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 m/l I'd actually I'd actually favor his truth be told like if I was studying 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 we go Daniel Burke Twitter here we go how I'd loan machine-learning in 2020 80% software engineering web development be 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 so two bench papers were code made with ml so sooner bench is where you're going to find all of the state-of-the-art machine learning models benchmarked on a number of different data sets 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 those papers are code there's soda bench if you want some datasets to where to find different data sources if we come back up here back to process one of the steps of machine learning is data collection so one of the ways that you can collect data is through existing datasets so Google dataset search Cagle datasets a curated list of free data sets by data quest if you have anything else that you want to add to this please let me know cool resources how to actually learn all of this now I'd highly recommend go do the learning how to learn course on Coursera that'll basically you had a learn or there is actually on 0-2 mastering are learning how to learn course by Andre 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 five days per week and then if you want to create your own curriculum as I said this is myself created AI master's degree but if I was to do it again I'd probably do something more like this by Jason Ben and as in learning machine learning Plus software engineering plus web development so these two software engineering a 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 gonna be spending a lot of time at my next learning journey as 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 road map but it's really not the end of the road isn't let's go back to the keynote end summary + 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 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 kinda didn't cover we could have actually covered that's not too too difficult but that's alright 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 that definitely has to be some thank yous and rounds applause that emoji up there was like a little trigger for me Daniel famoso is machine learning mind maps you should definitely check those out hands on machine learning book 2nd edition is where I got a lot of these concepts from saying with the hunt Paige 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 other 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 math 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 wow 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 here 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 reasons 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 you you
Info
Channel: Daniel Bourke
Views: 540,935
Rating: 4.9480848 out of 5
Keywords: machine learning field guide, machine learning full tutorial, full machine learning roadmap, machine learning 2020 tutorial, how to learn machine learning in 2020
Id: pHiMN_gy9mk
Channel Id: undefined
Length: 157min 14sec (9434 seconds)
Published: Sun Jul 12 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.