 What's up guys, it's Josh and we're back again with another video. Today we're gonna be talking about my own personal journey over this past winter break where I was kind of relearning and also teaching myself some new concepts in artificial intelligence and machine learning and I'll kind of go through the process of why I was doing that, how I'm doing it and give you guys some tips as well if you're interested. For those of you that don't know, my name is Josh Beasley and I'm currently a senior at Yale University studying computer science. This channel consists of me sharing my life with you, college application tips, CS stuff, magic. If any of that sounds interesting, hit that subscribe button down below and join the community. So this is kind of an interesting video and something that I've been working on a lot recently but I thought I would share with you because I feel like it's something applicable not only if you're interested in AI machine learning or if you're just interested in learning how to teach yourself something because I feel like that's a very valuable skill that I picked up over the past couple of years especially as I've gotten into college and it's something that's going to help you infinitely along the line later in life, just being able to pick up a textbook, pick up some sort of resource and teach yourself brand new content, especially content that literally is that and the entire book that I used would have been an entire college class if not more than the amount of content that you normally see in a college class. So for those of you that are unfamiliar with AI or machine learning, obviously we have the quintessential examples that we've seen in the mainstream media, Terminator, SkyNet and obviously you hear that Elon Musk is using AI for self-driving cars. If you guys aren't already aware, AI and machine learning are penetrating every realm of our lives as we speak of it, whether it's your Amazon recommendations where they're recommending something that you're just thinking about buying. And a lot of people think Google's listening to us but the scarier part is Google has so much data that they're able to accurately serve us ads on topics that we did happen to be just talking about. I mean, Netflix recommendations, everything along the lines and obviously the more physical things we see like self-driving cars but those are still a couple of years down the line. So AI is something that's already become so pervasive and a lot of people don't even know it. So in terms of like machine learning and trying to come up with the definition of it, the way that I like to think about it, I forgot who first exposed me to this methodology but basically if you think about software, they call it software 1.0 which is basically writing a program, giving that program input and then it's outputs your desired output, what you wanna see from the program. So if I had a program that a calculator that did math, I would input what numbers, what operation I want performed on them and they would give me the sum, the product, whatever I wanted from that. So machine learning or what they call software 2.0 is a completely different methodology. You are no longer technically writing the program. Rather you're creating a model that's flexible. It can be trained or it can be changed and you might think of the typical model as like a neural network, a support factor machine or even like linear regression, something as simple as that. But basically you're giving it input and it's giving you some random output then you take that random output, you compare it with the desired output and you use that to kind of adjust the model so you're minimizing the error. So what I just talked about is one realm of machine learning called supervised learning. There's also unsupervised learning where you don't have specific labels on the data and that normally consists of learning where it's you're clustering certain things together or using certain characteristics to kind of build associations between different elements within the data set. And then lastly there's reinforcement learning which you probably heard a lot about when it comes to like game playing and that's where you have this, you have a bunch of different states you can move to, you have a bunch of different actions you can perform in each of these states and certain actions lead to certain rewards. So you use a bunch of math and algorithms within that that I probably won't go too deep into in this video to basically calculate what actions and what states will lead to the maximum amount of reward. So that's basically a brief overview of AI and machine learning for those of you that are interested. It's something that I've taken a deep dive into recently but now I kind of wanna talk to you about why I'm actually learning machine learning. So there's two kind of main reasons. So the first main reason is my thesis is going to evolve a lot of deep learning. So when I say deep learning that's mainly the neural network supervised learning part of AI that I talked about. So basically I'm going to be using deep learning and combining that with a lot of concepts and cybersecurity. So if you guys haven't seen it yet check out my senior thesis video where I kind of talked about this but I'm gonna basically use deep learning algorithms specifically like generative adversarial networks and recurrent neural networks to train them on passwords and then have them be able to produce unique passwords in hopes of finding other passwords on these lists. So basically it's a password cracker an AI that will produce random passwords some of which will hopefully be able to crack your own. Now if I didn't explain that super well that was just right off the top of my head but definitely go check out my senior thesis video I kind of break it down into all the different steps if you're interested in that. And the second reason is it might be useful in my career in the Air Force is like a cyber warfare officer because I will be commissioning in May and I hope to become a cyber warfare officer we'll find out about that soon but basically not only are there a lot of opportunities for cyber security related work but the DOD also has this thing called the JAKE which is the Joint Artificial Intelligence Center and they have a lot of great opportunities for any service men or service women who are interested in pursuing artificial intelligence especially those that are already trained in cyber. So I hope to pursue that as well and I think that learning AI rigorously would be one of those first steps. So now I'll kind of talk about I didn't come into this completely new and I've had some prior AI experience because of my coursework. Unfortunately Yale doesn't let you declare like a certain focus like a lot of other CS majors do so I couldn't focus in AI or machine learning but I did have the opportunity to take a lot of different AI and machine learning classes. The first of which was a class I took my sophomore year called Artificial Intelligence and this class was good but it was really just a brief survey course where we covered so many different topics and really just dipped our toes in the water in these different topics and really didn't go in depth in anything. So you know we started out with search. So like A star search, depth first, breadth first, different ways of searching to find certain paths and we built that into kind of these tree algorithms. So like minimax, alpha beta pruning, Monte Carlo tree search. These are very applicable to games specifically where you can kind of build out the game tree of all the different possible moves and then use these searching algorithms to search the tree or prune off certain parts of the tree to find the optimal move that you make. And soon we moved into some computer vision topics like convolution, edge detection and then we finished off the semester with some neural networks and some reinforcement learning. So it was great but like I didn't feel like I was very competent in any single area of AI. Later, actually last semester I took two different AI classes which I talked about in my video where I reviewed my senior fall classes so I won't go too in depth into them now but one was called Computational Intelligence for Games where we looked at some AI techniques specifically relating to games which were mainly some more basic techniques like the search techniques I talked about before but mainly with a focus in reinforcement learning and then also using artificial neural networks. And my second class I took last semester was called Big Data AI in Russian Politics and that was more of a data science course so we more focused on more, we use R and we focus on more data science techniques as they apply to machine learning not like the neural network side of things. So it was more like K-means or dimensionality reduction, those sort of things. But I still was able to make a final project using a convolutional neural network in Python because my professor allowed me a lot of flexibility. So that sounds like a lot and it was but a lot of these courses didn't go as in depth as I'd liked. So I generally had a familiarity with all these different topics in AI but I really wanted to kind of do a deep dive into deep learning. So for those of you that are interested I kind of want to walk through the different I guess prerequisites that you need before you want to start machine learning because a lot of people will tell you oh you need all this math, you need to know calculus, you need to know linear algebra, you need to know statistics and yes that is true but you don't necessarily need to know all of that stuff and there are a ton of free resources on Khan Academy or a bunch of other websites to kind of pick up these more specific skills that you need depending on what area of machine learning you want to go into. So my experience, I'll personally be talking about my own personal experience as it relates to deep learning. So the first area is math. You're going to need to know some basic linear algebra because if you know anything about neural networks it's basically a big massive dot product, massive matrices using all these different weights and parameters. So it helps to know actually how those operations works. Next is calculus. So you don't actually need a calculus with the modern frameworks for actually coding neural networks like TensorFlow or PyTorch but it is helpful to understand some calculus basically because the main algorithm back propagation that's used for optimizing neural networks relies on gradient descent which is basically a partial derivative where you're minimizing the loss of the network using all the different weight parameters so you can adjust those properly. So it does help to understand some basic calculus. Basically if you know what a derivative is or like a partial derivative that's probably enough. So you also need to know statistics. I don't have that much of a statistics background. I haven't taken a single college level statistics class. I guess I took AP statistics in high school but that's mainly used for some of the more what you would typically lump into data science some of the techniques that don't necessarily involve deep learning you know like logistic regression, linear regression those types of things support vector machine statistics are probably a little more helpful. The next area is programming. So basically both of the big neural network frameworks right now for deep learning which one is TensorFlow and then the others PyTorch they both use Python. So you're gonna need a familiarity with the Python programming language and then also a familiarity with both of these frameworks where you use Python to build neural networks and build these models and train them. Also when it comes to data science, NumPy and then pandas are two other packages that are very helpful when it comes to wrangling your data because a huge part of deep learning is not actually building the network. You can find a lot of these networks publicly available or kind of tweak them for your own uses. A lot of it kind of becomes collecting data, labeling data and then mainly what NumPy and pandas are helpful for mangling that data into whatever form it's most optimal for your neural network because a lot of times you kind of have to normalize all these values between zero or one and kind of pick those parameters and the range that the values that those parameters can take very carefully if you want your neural network to be optimized. The next kind of knowledge that you'd want to kind of dig into is the underlying principles of machine learning. So this involves, I mean just to name a few off the top of the head but how you go about collecting your data, what a training set is, what a testing set is, how you can perform validation on machine learning models before you actually test it on the testing set and then obviously the different architectures of neural networks, how a neural network works, what is gradient descent, what is back propagation and that's where kind of the sum of the math ties in. Also, if you're interested in any computer vision or like in any types of neural networks that will recognize pictures or just take images as a data source, knowing about convolution and those different image processing techniques, I luckily was able to learn about that in one of my electro engineering classes but that also helps a lot. Like convolution, max pooling because it's not only neural network layers, you also have convolutional and pooling layers within like a convolutional neural network. So that would help as well. Kind of the next step I would take is familiarizing yourself with different models. So like I said, a convolutional neural network is one, you have the standard artificial neural network, you have recurrent neural networks which are very good with time series data, you have a bunch of different types of generative models whether it be a GAN, like a generative adversarial network which actually has two networks that have a bad line against each other or like a variational auto encoder, those all kind of fall into that category as well. And lastly, you just need practice. Like I needed, I needed to build these models, I needed to train these models, I needed to practice, you know, wrangling data. I mean, there's a lot of cool data sets that you can use already publicly available online. If you check out Kaggle.com, they have competitions for specific data sets as well, which is super helpful when you're learning. Now I will be talking about the actual resources I used. First of all, I kind of got an introduction to data science. I hadn't been super familiar with NumPy and Pandas, specifically in Python before, I was fluent in Python but hadn't used those packages extensively. So I found it very useful because I had a free data camp subscription from that political science, big data and AI class I was talking about earlier. I was able to take some of the data camp courses that related to NumPy and Pandas just to kind of brush up on those and get familiar with those. The next step I did to kind of familiarize myself with some of the bigger picture concepts within deep learning was MIT has this deep learning course that they put on every January and it's publicly available on YouTube. So I was literally, it's only like six-ish lectures. Somebody correct me if I'm wrong in the comments if they know more about it. But it's like six lectures and they go through different types of networks and I was shocked by how much they were able to condense this very complex material into just like an hour-long lecture. And the professors that teach that class are amazing and you can actually do the same projects that some of the MIT students are doing. So that was kind of a great big picture and introduction until I kind of went into the book work. Speaking of the book, I highly recommend, let me get this book for you guys. I did a lot of research on what books to choose when I was actually starting this journey. But this by far was the one that I was most highly recommended. Hands-on machine learning was scikit-learn, Keras and TensorFlow. So Keras and TensorFlow are the neural network packages that you can use and then scikit-learn is more just for general machine learning types of stuff and working with data. And this book is incredible. Like this is version two. I think version one doesn't include as much like deep learning stuff. But version two, I mean, it takes you all the way from a linear regression to a GAN or like it even has a section on reinforcement learning so you can implement some like deep Q learning and those types of things. And this book not only does it walk you through everything and have beautiful diagrams, is it super understandable, but it also has a ton of practice problems where it kind of reinforces not only the concepts but gives you different data sets and chances to implement a certain model on a data set and it gives you like a benchmark accuracy score. But also everything in the book, all the code they present is publicly available as Jupyter notebooks. Like you don't even need to buy the book to access the Jupyter notebooks. It's not really gonna make sense but you can access his notebooks online on GitHub and it's all there for you. In addition to the book and the MIT deep learning lectures, I also found some other interesting channels online specifically YouTube that were super helpful for me. One is Andrew Ng who has done a ton of deep learning work. He's kind of done big name when it comes to education and deep learning. He has like a full course era course. I didn't end up doing the course but he does have a lot of publicly available YouTube videos from that course online. So I checked out some of those and then also for some of the more statistics heavy data science topics within machine learning, within the first part of the book when I was learning scikit-learn. StatQuest is a wonderful YouTube channel that I discovered recently that walks through these concepts and makes them so easy to understand and helped kind of fill in some of the gaps in understanding that I was stuck on within the book. So this was a way longer video than I thought it would be. But basically I kind of hope I lay down what is machine learning and why I'm doing it. All the different kind of prerequisites and steps you should take if this is something that you're interested in because I know there's a lot of CS students that are watching my videos and may not have been exposed to this type of stuff but yeah, you know, take some classes at your university kind of get exposed to it. Realize it like unless your school has a specified deep learning course or a specified machine learning course it's gonna take some digging to kind of become familiar with a lot of these more complex topics but I was able to do it in about a month and I'm by no means an expert. Don't take anything I say in this video as expert knowledge. I'm still learning myself and practicing but I really hope to kind of take you guys along as I kind of implement these projects to start working on my thesis and use this kind of newfound knowledge to kind of further my experience as a CS student. So if you have any questions about this, comments, drop them in the comment section down below. I am responding to almost every single comment these days. If you enjoyed the video, drop a like. It helps me and supports the channel a lot more than you think. It really helps the algorithm and helps this video pick off. If you're new here, if this is the first video that you've seen and you're interested in this AI CS stuff, I have a ton of other CS related videos. I heard my experience as a CS student on this channel. So please check those out and hit that subscribe button so you won't miss another one. With that, I hope you guys enjoyed the video. I hope you're staying safe and healthy and I'll see you next time.