Level up your software engineering skills as a data scientist | ML Monthly February 2021

Daniel Bourke reviews February 2021's top ML resources, including a brain-computer interface that decodes keystrokes from EEG signals, LJ Miranda's guide to software engineering skills for data scientists, and papers on training data influence and fifty years of statistical ideas.
Chapters
I'm ready. Are you ready? Of course you are. Because why? Well, it's that time of month again. It's Machine Learning Monthly. Specifically, Machine Learning Monthly for February 2021. And if you're new here, first of all, welcome. Second of all, Machine Learning Monthly is— let me just show you it. It's a blog post that I write, or a newsletter as well. There's my face there. There's the title of the post. It's a blog post/newsletter that I write. If you want the newsletter, you can subscribe. I'll leave the link in the description, but it's of the latest and greatest, but not always the latest things from machine learning that I've found over the previous month. So this one's for February 2021. It is now March 2021. So it has all of the stuff that I found during February. And if you've been here before, well, you know the drill. So without any further ado, Let's jump straight into it. Again, if you want to sign up, you can go to the zerotomastery.io blog, enter your email, and you'll get this delivered straight to your inbox. Or you can just read the post from this link and you don't have to watch this video. Anyway, what you missed in February as a machine learning engineer. So very, very exciting. I worked on this for a long, long time and it's still in progress. However, during the COVID lockdowns of 2020, I passed the TensorFlow Developer Certification, and there's a video on my YouTube channel about it. I'm not going to go through it, but you can see it all there, all the, all the stuff about the certification, etc., etc. Long story short, I had a lot of questions of people asking me, I want to learn TensorFlow, where do I start? And how do I pass the TensorFlow Developer Certification? So I created the Zero to Mastery TensorFlow for Deep Learning course. And if you go here, you'll see the link. Right now it is on Teachable and you can see all the stuff there. If you click the link and sign up to the Zero to Mastery Academy, you'll see it's an affiliate link. So not only will I get paid for the course, I'll get a little kickback if you sign up to the Zero to Mastery Academy. So go check that out. It teaches 3 things, mainly the fundamentals of deep learning, a machine learning paradigm taking the world by storm. You may have heard of it. You probably have if you're watching these videos. The Fundamentals of TensorFlow, a framework used to write deep learning algorithms, for example, neural networks. This is a beginner-friendly course, by the way. So if you've had more than a year's experience writing TensorFlow, this course is not for you. If you're new to deep learning and TensorFlow, it is for you. And then finally, how to pass the TensorFlow Developer Certification. All of the materials are on GitHub and they're constantly being updated. So if you go check this out, you can see all of the materials. There's notebooks, there's exercise and extracurriculum, slides, etc., etc. And another note, I have been streaming a lot of course development, the future parts of the course on Twitch. So go check me out on Twitch if you want to see some live coding. There you go. There's my last video. Anyway. Oh, I also made a machine learning development deployment tutorial for 20% Software Engineers. So it was for Stanford CS329S, which is— I'll show you. This is a very, a very good course as well. So check this one out. This is not in the monthly, but it'll be part of it. So CS329S, Machine Learning Systems Design. In other words, how should you design your overall machine learning system rather than just building a model? What are all the parts around that model, such as data collection, data verification, modeling the data, model deployment, and then so on and so on. So I made a part or a tutorial on how to deploy machine learning models, so the deployment part of that. So when I tried to adhere to the narrative of rather than it just being this build the model then deploy, I put it together like a little— like a cooking show. If you watch the tutorial, that's what I base it on. It's like a cooking show for machine learning model deployment. You start with a bunch of ingredients, which is a machine learning model, then you go through a step that's like a method, and then the finished product is your model living on a cloud service, i.e., Google Cloud, and you're able to use it to make predictions. So go check that out. Now on to stuff from the community. There's a beautiful paper sent to me by Mustasham and team. So very sorry if I'm, uh, and team, very sorry if I'm pronouncing that name wrong, but I'll do my best. And the latest paper takes electro ECGs, EEGs, So brain scanning stuff from a brain computer interface and passes them through a deep neural network to try and predict what key you're thinking of pressing on a keyboard. So imagine this, you've got a helmet and it's reading your brainwaves and you're looking at this keyboard. Can you predict from just the brainwaves what key I want to press? So say if I want to press C, what does that look like in brainwaves? Now, I'll show you the paper. It's on archive. May take a few seconds to load. But why is this important? Well, I personally take using a keyboard for granted. But what if you couldn't use a keyboard? What if you couldn't use your hands? What if you couldn't use any of your limbs? What if you could put on this brain-computer interface and it could read your brainwaves and then you could communicate with the world by just thinking rather than having to physically type something? So if you imagine like Stephen Hawking in his, in his wheelchair would use a service similar to this. Now I am not well enough educated on brain-computer interfaces to know what all of these things are like state visually evoked potentials. But long story short, I read through the paper and their deep neural network. So this is the versatility of deep neural networks, right? If you can structure your problem into a deep learning problem in terms of inputs, algorithm outputs, you can achieve outstanding results. And Moustachem, so Moustachem who sent it to me, Osman and Hoysan, their deep neural network outperforms state-of-the-art on both of the benchmark datasets they used by achieving impressive information rate transfers, 265 bits per minute and 196 bits per minute respectively with only 4 sec— 0.4 seconds of stimulation. Now, again, I haven't done enough research into what brain-computing interfaces is, but if they're claiming state-of-the-art on both datasets, congratulations. It was a great paper and all the best with your future work. So thank you very much for submitting that to Machine Learning Monthly. And we also have— oh yeah, so if you're interested in, in brain-computer interfaces, go and check out this paper. It's to me, I was reading it. It's very similar to how I imagine things are going at Neuralink. Not that I know what's happening in Neuralink, but if you want to see Neuralink, of course you can look up Neuralink, building a brain-computer interface. Yeah. Interfacing with the brain. A lot of those figures. Can you put that into some sort of inputs to a deep neural network and then end up with the outputs that you're after? Onto the next one. Alvaro's Guide to TensorFlow Serving. So Alvaro is back. Last time he taught us about PyTorch serving. Now there's TensorFlow serving. What does serving mean? Well, it means if you have a TensorFlow model and you'd like to serve it to someone, so in other words, get it in their hands. Now, the beautiful thing I like about Alvaro's blog posts is that they're completely within GitHub. And so if you don't necessarily have your own blog or something like that to share your work, you can do it from within a GitHub repo. So if you were applying to a job or you wanted to show someone your work, it has code and it has a README with all of the steps explaining the code. So in this tutorial, Alvaro goes through and teaches you about TensorFlow Serving, which the, the cool thing about this is that it kind of links back in with the ML deployment lecture that I gave or tutorial because on Google Cloud we used AI Platform. So if we go AI Platform and we served our TensorFlow model through Google Cloud's AI Platform. Now the cool thing about AI Platform is that it's fully managed by Google, so you just have to upload your machine learning model. You can learn more about this in the tutorial that I linked, but AI Platform runs TensorFlow Serving. So what Alvaro's tutorial is on, Under the Hood. So if you want to learn how to write the TensorFlow serving code that AI Platform uses, go and check out Alvaro's tutorial. So thank you very much, Alvaro, for submitting that. I really appreciate it. Your second time in Machine Learning Monthly. Now we're on to things from the interwebs. Oh, and of course, if you would like to submit anything to Machine Learning Monthly, send me an email to daniel@machinelearningmonthly.com. Mrdburke.com and with the title Machine Learning Monthly Submission, and you might see it in a future episode. First one, Chip Huen's Outstanding Machine Learning Blog. So I'm a big fan of Chip's work. And so this is going to be a testimonial to Chip and as well as what she puts out into the world. So first of all, go and check out her blog as a, as a whole. You'll see it in a second. The links are here. And also follow her on Twitter if you want machine learning related stuff on Twitter. But let's go check it out. So these are two posts that she's put up recently. This is MLOps Tooling Landscape V2. We saw the version 1 of this post in an episode of Machine Learning Monthly last year. Now this has been updated, so plus 84 new tools. Now if you're wondering what MLOps is, the way I imagine MLOps is, it's kind of like what we spoke about before with the machine learning systems design. If you have a machine learning system, what are all the operations that go into that system? So not just the model, everything around the model, all of the operations. That's what MLOps— operations— stands for. If you go through here, one of the main points is an increased focus on deployment. This is a very amazing blog post that goes through what's happening in the MLOps space. So different companies are getting funded. A whole bunch to do with deployment and whatnot and different services. MLOps infrastructures in US, in China are diverging. So there's a lot of difference between them there. A lot of similarities though too. More interest in machine learning production from academia. So the AI research scene seemed to calm down in 2020. Google froze hire for AI. Uber laid off their entire AI research team. Element AI was sold for cheap. However, the number of machine learning tools is still increasing. Look at that. From only, let's say, 5 years ago, what have we gone up? We've doubled. So it's going like a Moore's Law type operation here. What's the main one? Modeling and training has got a lot here. Data pipeline, this, this orange bar. We're getting all-in-one. All-in-one is also growing. So they're all growing. So go and check out this blog post. And there's another one here, ML is going real-time. And in this post, we'll go and look at it in a second. The main takeaway that I got is Chip breaking things down into machine learning systems. And when I say systems, it could be an application, it could be a model powering something, some sort of service. But ML is going real-time into online predictions and online learning. So for online predictions, would be something that is made while someone is using your ML system. And you're probably used to this without even knowing it. So for example, a Tesla self-driving car, online predictions have to be made. What that means is while the car is driving, because it has to be fast, the inference that your model makes, it can't— the car can't send video to the cloud, make a prediction on the cloud, and then come back to the car and do something. The predictions have to be while you're driving the car. And for online learning is how quickly does your ML system update itself? So for example, if you're browsing through your Twitter timeline or Instagram or something like that and you may find that you liked a certain type of post, how quickly can the following subsequent posts in that timeline update to reflect that you liked a certain type of post or didn't like a certain type of post? So right now, a lot of systems, I believe, would be in the batch learning space. So you take some information, you go through your timeline and it might update once a month or once a week or something like that with refresh preferences. But what Chip found is that there are some services out there. Let's go to the blog post, mostly in China. So if we look up here, China challenges There's a point here about China. MLOps race between US and China. So there was a point here that several big internet companies in China gives me the impression that their infrastructure for machine learning production is way ahead. Many internet companies in the US are still wondering if there's value in real-time ML while their Chinese counterparts are already not only doing real-time inference but also online training. So they're, not only does the inference happen online, But while you're using the system, it retrains itself to, to update in live. I don't even know how you, how you would do that. You'd have to do something with streaming data, not just batch data. There's a great graphic here, the difference between— this is a great post, so just go read the whole post— request-driven versus event-driven. So now things are going rather than just per request, so you would request something, then it would come back, it's going event-driven. So they're kind of predicting that everything's going to happen in a stream. So why don't we, why don't we train in that sort of the way that that data is flowing in as well as serve predictions at the same time? So go check out the blog post. Massive, massive work from Chip. Make sure you subscribe to the blog and make sure you follow her on Twitter. On to the next one. Use GitHub for your machine learning operations. We are seeing a massive theme with late Machine Learning Monthly issues lately. And that is MLOps. I really need to do a video on this, but if you want to use GitHub, if all your code's on GitHub, why not just use it for MLOps as well? So there's a great website here, mlops.githubapp.com, which has a collection of all the most valuable resources that you can use that teach you and give examples of how you can use GitHub for your machine learning operations. So if you have— you find yourself running a series of experiments over and over again, why not automate them, such as evaluating how your machine learning model goes? Why not automate them using something like GitHub Actions so that if you changed your model code and pushed it to a GitHub repo, you could automatically trigger a GitHub Action to run some code in the background to evaluate that model and then send the results back to an issue? So make sure you check out this if you're using GitHub for your machine learning services or machine learning learning, you probably want to start going into MLOps with GitHub. All in one place. Next one. This is an outstanding blog post because, you know, do you ever stumble upon those things where it's like, I've been thinking about this stuff for probably the last half a year maybe, or few months, and then you just find one resource that's kind of like collated all of your thoughts even better than probably you could have. If you gave yourself enough time, you probably could have, but you just haven't because you're lazy. This is that type of post for me. How to improve software engineering skills as a data science researcher. Now it's from LJ Miranda. So big shout out to LJ Miranda. It goes through the narrative of if you were to— this is actually, this is another type of post that I really love. It conveys nonfiction information such as deploying a machine learning model in the way of a story. If there's anything we know about history, it's that the best story always wins. So if you can convey the things that you've learned in a story format, it's going to help those who stumble across your work to understand them. And I understood this post from the first time reading it. So the exercise is to create a machine learning application that receives HTTP requests and then deploy it as a containerized app. So if you're like me and you learn to code Python in Jupyter Notebook or Google Colab or something like that, you probably think of these things like HTTP requests, Python scripts, deploying as a containerized app, and you're like, what does any of this mean? Well, L.J. Miranda, in a beautiful way, goes through and describes all of them. Create a machine learning application that receives HTTP requests, HTTP, and then deploy it as a containerized application and talks about, wait, why an ML service? So these are parts of a machine learning systems design. This is a theme for this one, actually, machine learning systems design. So go and check out this post. It's beautifully written, beautifully illustrated. Look at that. Talks about things like Docker, what's going to happen when you create a Dockerfile, et cetera, and learn how to deploy to a cloud platform. If you wanted to, you could extend this one, read this post, and then go through my tutorial. Once you've read that post, you'll be able to go through my machine learning deployment tutorial because we use a lot of the, the techniques that Eljay Miranda talks about. Amazing blog post. What's next? Oh, this one's dear to my heart as well. FreeCodeCamps upcoming data science and machine learning curriculum. So I donated to this. Long story short, FreeCodeCamp are working on probably the— it's going to be the most— what's a good word for it— the most thorough online machine learning and data science curriculum. However, they need resources to create it, so they wrote a blog post discussing what they're gonna put in the curriculum. Or of course it's going to change as it goes along, but starting from foundational mathematics, linear algebra, matrix algebra, calculus, to EDA, to supervised and unsupervised learning algorithms, to libraries like SQL for databases, NumPy, SciPy, Pandas, TensorFlow, scikit-learn. You can read all of that in the blog post. Make sure you go and check this out. If you've ever seen FreeCodeCamp before, they do amazing, amazing world-class code education. Curriculum expansion to math, ML, and data science. They started with web development. Now they're coming to the machine learning world. Have a look at this. All of the stuff you want for machine learning, because as you know, there is a lot. And they're running— how long's left? They're still going. So go check it out. 2021 Data Science Curriculum Pledge Drive. There is 23 more days left to donate. They're trying to raise $150,000. I believe this first— it may have ended previously, but they probably— they've extended it because they're trying to get towards their goal. So Donate if you can, but just to keep this on your radar, FreeCodeCamp are making a data science and machine learning curriculum. Onto the next. This was another amazing, amazing blog post. So learn how to build the machine learning model taking NLP and now computer vision by storm. If you've been paying attention to previous Machine Learning Monthlies, you'd notice we talk about the transformer architecture. And if you've, you've just been paying attention to the machine learning world in general, Transformers are taking over from NLP to vision. They did NLP over the past couple of years, now they're heading into vision. So if you want to understand what's going on with the transformer architecture, make sure you read this blog post. I personally read it end to end. Now I've got to go back through it with the code. It's Transformers from Scratch by Peter Blom, and what's even more great Is that— that doesn't really sound grammatically correct. Doesn't matter. Peter also teaches machine learning online, so if you'd like to brush up on the understanding of neural networks and backpropagation, two fundamental things to understanding how a transformer can be applied, there's videos for that. Linear models, neural networks, scalar backpropagation, and they're by Peter as well. Deep learning, tensor backpropagation, convolutional layers. I'm not going to go into those because they're all linked in this Transformers from Scratch blog post. Self-attention. It goes through self-attention. I still don't fully understand how attention works, but attention is all you need. Attention is all you need. I'm figuring out myself and I'm using this post and this paper. This is a paper, Attention is All You Need, where the attention mechanism, which is the backbone of the transformer architecture, was released in this paper, and it's explained beautifully in this blog post. So models that pay attention to themselves and are still able to learn— yes, that's, that's why self-attention works. So go through it, amazing, amazing blog post and code to go with it. So if you want to code a transformer from scratch including self-attention, look at this. I'm still scrolling. Wow. It took me, it took me a good hour and a half to read through this, by the way, because there's so many amazing things. So now I've got to spend another 6 hours or so going through the code and trying to reverse engineer it myself because anything I cannot create myself, I do not understand. What is next? This was an amazing paper as well. So Estimating Training Data Influence Using TrackIn. Is that how you'd say it? Or TraceIn? I think it stands for tracing gradient descent. But the premise of this paper is that they used a general method. This is what's so exciting about it. A general method, a simple method to estimate training data influence. So if you have a single training sample, how does that sample influence your model? Is it— does it hinder it or does it help it? And the way they described it is if you have this sample, let me show you an example. Easier to explain. If you have the example of the target class being a chameleon, what are the proponents? We zoom in, go down here. What are the proponents? So samples that helped. How much influence do they have on your model's gradient and how— what, what images or what samples are similar in terms of their embedding space, how they get encoded by the model. Proponents are samples that helped your model. Whereas opponents are samples that degraded your model's performance. And so if you imagine here, it kind of makes sense is that the chameleon was confused almost with this photo because you see they look like similar animals but different color and then iguana and then agama and then dissimilar, really dissimilar images here. We've got similar images and then these images are really different. So the most different. So proponents and opponents. That's how I understood it. And the beautiful thing about it is— where is it— is that it's general. Yeah. TraceN is a simple, easy to implement, scalable way to compute the influence of training data examples on individual predictions or to find rare and mislabeled training examples. So if you want to understand how your training data samples affect your model, go and have a look at this paper. You can apply it. The beautiful thing is, is that— does it say here that it's generally applicable? So gradient descent. Here we go. The ideas underlying tracing deep learning algorithms are typically trained using an algorithm called stochastic gradient descent or a variant of it. So the beautiful thing about tracing is that it can be applied to any deep learning algorithm that uses a variant of stochastic gradient descent. So if you're using an optimizer like Adam, you can use it. So I've read through the paper of this. I haven't quite dug deep into the math behind it, but it looks relatively straightforward there. Of course, it'll only be relatively straightforward once you apply the code. So the code is on GitHub, GitHub linked in the paper. Go check that out. What's next? Codecademy Statistics with Python YouTube series. I'll read here. This is very helpful of my past self to leave myself a note for what to say in the video version. A very common question I get is, first of all, how do I start machine learning? Hopefully I've, I've answered that through previous blog posts and whatnot. But another one I get is how much math and what statistics do I need to know should I know when starting out data science? And now, honestly, I struggle for an answer because it depends on the problem. And since I've been writing code in data science and machine learning stuff for a while now, many of the things I've forgotten. I've forgotten. Not, not to say that I don't know them, but in saying that I don't have as much as a beginner's mind anymore because the things that I do are sort of— I've learned them. And so depending on what problem, I apply them automatically. So it's hard for me to reverse engineer what someone will need as a broad sense. But if they tell me a specific problem, then I can start to apply stuff. That was a long-winded way of saying I'm probably not the best person to answer this. But if you want to go on to a series that explains it with Python, check this out. So this is Mastered Statistics with Python by Codecademy. There is 8 videos so far. And it starts from visualizations. It goes through simulating a binomial test, comparing one variable to another or one change to another, and planning and implementing an A/B test, hypothesis testing for an association. So if you want to learn statistics and you want to write them with Python, go and check out this YouTube series completely free. That's why it's amazing. And speaking of statistics, The most important statistical ideas of the last 50 years. Specifically, counterfactual causal inference— what would happen if this happened? Bootstrapping and simulation-based inference— so using lots of random simulations in an attempt to recreate reality. Overparametrized models and regularizations— in other words, build a very large model to first overfit on data and then regularize that model to prevent it from further overfitting. Multi-level models, models which adapt to a range of different data sources. Generic computation algorithms, reusing existing compute algorithms and separating them from model creation. Save yourself a lot of time, like separating compute and storage. Maybe that analogy wasn't the best. You know where I'm going with this. Adaptive decision analysis, designing, designing, deciding, designing, designing experiments such as A/B testing and using online learning for better decision making. Just like we, we spoke before, this YouTube series, if we want to design A/B tests. There we go. A/B testing. Robust inference models which can still be used even if some of their inputs aren't true. So this is the ability for a model to, to generalize and, and learn great patterns even though some of the inputs, like if your samples are labeled wrong, but somehow your model still is able to learn around these things. And finally, exploratory data analysis, EDA. What do the patterns in your data look like? Of course, there are more questions that you could, you could ask during EDA, but I wanted to keep this nice and short. If you want to dive deeper on each of these, the paper is well worth the read. If you want to learn about statistical ideas from the last 50 years— that kind of rhymes, kind of doesn't— go and check this out. It goes into them in depth and how they relate to each other. That's probably the most important point because you can know You know the definition of something, but until you start to understand how that links into your other points of knowledge, so like a big tree, like a big graph, that is, that is where the magic happens. Idea sex is what you could call it, maybe. But go check out that paper if you want to learn about the most important statistical ideas of the last 50 years. And I believe that is it. So once again, a massive month for the machine learning world in February. MLOps exploding, figuring out what data samples have the most influence in your sample and your model. That's also another trend. And of course, Transformers are still taking over the world. So go check out the blog post, subscribe to those people like Chip, LJ Miranda, if you want to see their posts. And if you want to get this, the next issue of Machine Learning Monthly, chuck your email in there, press subscribe now. And if you want to, if you want to submit your own work to Machine Learning Monthly, can be beginner, can be advanced, doesn't matter. Whatever, whatever you're publishing, if you're publishing something out there, if you're putting yourself out there, I want the rest of the world to know. So send me an email, daniel@mrdbourke.com with the subject Machine Learning Monthly submission, and you might see yourself in a future issue slash episode. But of course, all the links you need will be in the description below. As always, keep machine learning and keep moving, keep creating. I'll see you next month. You know, we always dance to the outro.
More from Daniel

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

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

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

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

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

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

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

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


