1 00:00:00,060 --> 00:00:04,410 And we'll come back to the class of, of course, about the complete introduction to the science with 2 00:00:04,410 --> 00:00:04,900 Python. 3 00:00:05,460 --> 00:00:09,930 So in the past few classes, we talked about the many tools that you guys can use to be able to perform 4 00:00:09,930 --> 00:00:12,970 data science with Python programs. 5 00:00:13,000 --> 00:00:17,850 We talked about pendas, we talked about Seabourne, known by Skype and other things. 6 00:00:18,930 --> 00:00:24,060 And right now we are going to talk about another topic that is really, really related to that science 7 00:00:24,060 --> 00:00:28,880 and that requires a lot of data science to be able to be performed. 8 00:00:28,890 --> 00:00:31,280 And this is machine learning. 9 00:00:31,740 --> 00:00:36,630 So basically, in the next few classes, we are going to talk about machine learning in general. 10 00:00:36,630 --> 00:00:42,120 What is it, how it works, the different types of machine learning we used to have? 11 00:00:42,240 --> 00:00:48,620 Well, I'll try to go as in-depth as possible and keep it as simple as possible as well. 12 00:00:48,630 --> 00:00:52,370 So not making nothing that is too complicated to help you understand. 13 00:00:53,130 --> 00:01:00,300 And also, we're going to talk about some of the algorithms, algorithms that can be used with machine 14 00:01:00,300 --> 00:01:00,750 learning. 15 00:01:00,760 --> 00:01:06,390 So this way you guys will understand some of those algorithms and how they work and basically how you 16 00:01:06,390 --> 00:01:09,000 can program them with the use of Python. 17 00:01:09,630 --> 00:01:10,470 So let's start. 18 00:01:11,610 --> 00:01:11,990 All right. 19 00:01:12,030 --> 00:01:14,220 So basically, what is machine learning? 20 00:01:14,250 --> 00:01:21,420 So the first thing that we need to do is really understanding what exactly is machine learning and before 21 00:01:21,420 --> 00:01:23,160 even going further in the topic. 22 00:01:23,460 --> 00:01:26,960 So basically, there are plenty of definitions for machine learning. 23 00:01:26,970 --> 00:01:29,100 So a lot of them exists. 24 00:01:29,850 --> 00:01:35,550 For me personally, machine learning would be the use of AI to provide system systems, the ability 25 00:01:35,550 --> 00:01:36,610 to automatically learn. 26 00:01:36,960 --> 00:01:42,560 So we say we'll use artificial intelligence that is based on data science to help machines, to help. 27 00:01:42,560 --> 00:01:44,840 But your system basically not a machine. 28 00:01:44,850 --> 00:01:51,840 It's a system to help your system learn and perform tasks based on past experience. 29 00:01:51,880 --> 00:01:56,840 So basically, let's say you take you create a system that will automatically drive. 30 00:01:56,850 --> 00:02:03,300 So basically to teach your system how to drive automatically, you give him a lot of videos, for example, 31 00:02:03,300 --> 00:02:05,600 or you will put him in a lot of experiences. 32 00:02:05,610 --> 00:02:10,590 So basically you will make him experience the road and many other things, and the system will simply 33 00:02:10,590 --> 00:02:18,540 adapt to do well to to your learning and adapt to the situation and then bring the outcome that you 34 00:02:18,540 --> 00:02:19,870 want to have at the end. 35 00:02:19,890 --> 00:02:28,020 So basically, you will tell your machine, I want this outcome and this is well, this is the income 36 00:02:28,020 --> 00:02:29,340 and I want this outcome from it. 37 00:02:29,670 --> 00:02:33,750 And that basically the goal of the machine is finding the best map possible. 38 00:02:33,750 --> 00:02:35,600 And this would be a supervised learning. 39 00:02:35,610 --> 00:02:37,380 We'll talk about it a little bit later. 40 00:02:38,010 --> 00:02:40,600 But this is one type of supervised learning that exists. 41 00:02:40,600 --> 00:02:43,140 So basically this can be machine learning. 42 00:02:44,160 --> 00:02:49,500 Next thing is machine learning can be the science of making computers learn and act like humans. 43 00:02:49,530 --> 00:02:54,580 So basically what we're trying to say now is really what this is really more advanced. 44 00:02:54,580 --> 00:03:01,260 So we're talking here about giving not a conscience to computers, but simply make computers understand 45 00:03:01,260 --> 00:03:07,050 their environment like human beings to basically understand faces understand. 46 00:03:07,230 --> 00:03:11,670 And this is really a more advanced machine learning at basic points. 47 00:03:11,670 --> 00:03:14,980 It's really helping computers perform certain tasks. 48 00:03:15,030 --> 00:03:20,730 Basically, let's say you want a machine that is able to recognize faces like, for example, on your 49 00:03:20,730 --> 00:03:21,930 phone or on your phone. 50 00:03:21,930 --> 00:03:30,000 You have a machine learning applications or a I that will be able to recognize faces if we create. 51 00:03:30,000 --> 00:03:36,150 Well, if we say that this is a machine, if we implement and it's a machine learning system, but it's 52 00:03:36,150 --> 00:03:40,440 going to do it's going to start learning from from its experiences. 53 00:03:40,840 --> 00:03:44,240 So we will learn each time that it will see a face. 54 00:03:44,250 --> 00:03:49,560 It will add it to its database and to learn more and more and more and more and basically to make those 55 00:03:49,560 --> 00:03:50,970 types of systems how it works. 56 00:03:50,980 --> 00:03:52,500 As I said, you have an income. 57 00:03:52,500 --> 00:03:57,720 So basically you have your income where your starting point and your outcome, let's say you want to 58 00:03:57,720 --> 00:03:58,510 recognize a face. 59 00:03:58,510 --> 00:04:05,700 So we will create a system and give the system a lot of faces and the system will get used to recognize 60 00:04:05,700 --> 00:04:11,430 faces and it will create a map to recognize faces the best way possible. 61 00:04:11,460 --> 00:04:13,980 So basically, this would be your machine learning. 62 00:04:15,000 --> 00:04:16,650 This would be your machine learning system. 63 00:04:16,980 --> 00:04:23,580 And you have plenty of algorithms that will help you achieve this goal unless there is the use of algorithms 64 00:04:23,600 --> 00:04:27,060 to allow analyze of data to make a prediction about something in the world. 65 00:04:27,070 --> 00:04:29,330 So basically, you could be used for this as well. 66 00:04:29,340 --> 00:04:34,650 So let's say, for example, on the stock market, you want to predict the movement of a certain stock 67 00:04:34,650 --> 00:04:35,870 in a certain direction. 68 00:04:35,880 --> 00:04:38,340 So basically you can use the machine learning for that. 69 00:04:38,910 --> 00:04:41,970 So what they will do, it will simply analyze the chart. 70 00:04:42,150 --> 00:04:47,040 And the what I'm saying analyzing it is going to be a pure technical analysis to be able to analyze 71 00:04:47,040 --> 00:04:51,990 all the aspects of the chart, to analyze absolutely everything, all the movements on each segment. 72 00:04:52,010 --> 00:04:57,060 Well, it depends how you programmed your your system, but it can be really, really, really advanced 73 00:04:57,930 --> 00:04:58,980 and basically with. 74 00:04:59,800 --> 00:05:06,340 All this information, it will be able to make the best purchases possible because to optimize the max 75 00:05:06,670 --> 00:05:13,120 and those are things that a machine can do, that a human being will not necessarily be able to do because 76 00:05:13,120 --> 00:05:20,020 the calculations that are behind a behind the scene of all this are really, really advanced. 77 00:05:22,090 --> 00:05:26,560 All right, so some examples of machine learning, so as I said, there are plenty of examples of machine 78 00:05:26,560 --> 00:05:26,850 learning. 79 00:05:26,850 --> 00:05:29,940 You can see them all right here so we can have image recognition. 80 00:05:29,950 --> 00:05:35,800 So basically, there are plenty of systems that exist in the world used for security purposes or any 81 00:05:35,800 --> 00:05:41,380 other purpose to be able to recognize well, for facial recognition, for example, or simply image 82 00:05:41,380 --> 00:05:44,770 recognition and just to recognize an image. 83 00:05:45,160 --> 00:05:45,990 Those are eyes. 84 00:05:46,000 --> 00:05:52,630 But to be able to be created, we have used machine learning systems to be able to make the creation 85 00:05:52,630 --> 00:05:55,250 of those systems speech recognition. 86 00:05:55,270 --> 00:06:00,340 So one of the most popular speech recognition that exists will be, for example, on Google. 87 00:06:00,350 --> 00:06:06,190 So when you go on Google and you go on Google Docs and you want to write down a text, they have a speech 88 00:06:06,190 --> 00:06:12,840 recognition system that you can talk and it will automatically generate a text traffic prediction. 89 00:06:12,850 --> 00:06:16,270 This can be, for example, well, for engineering purposes. 90 00:06:16,300 --> 00:06:22,060 So, for example, you want to you want to estimate the traffic or any other thing it can work as well 91 00:06:22,060 --> 00:06:22,980 for detection. 92 00:06:22,990 --> 00:06:26,340 So basically you can detect frauds on millions of transactions. 93 00:06:26,710 --> 00:06:31,450 So those are really advanced systems as well that can detect fraud and on millions of transactions, 94 00:06:32,080 --> 00:06:32,860 financial field. 95 00:06:32,900 --> 00:06:35,830 So, as I said earlier in the stock market. 96 00:06:35,830 --> 00:06:43,840 So to be able to predict the movement of a stock or a ETF or whatever, it's possible with the machine 97 00:06:43,840 --> 00:06:44,920 learning as well. 98 00:06:45,820 --> 00:06:52,810 So here you can find plenty of other examples of, for example, self-driving cars, simply the email 99 00:06:52,810 --> 00:06:54,360 spammers and malware filtering. 100 00:06:54,730 --> 00:07:02,020 So basically on your email, on your email it to choose an email to go to spam or to go directly to 101 00:07:02,020 --> 00:07:03,840 your email base. 102 00:07:04,480 --> 00:07:05,940 Basically, it's machine learning. 103 00:07:05,950 --> 00:07:08,430 So there are plenty of things that use machine learning. 104 00:07:08,440 --> 00:07:09,220 It's all around us. 105 00:07:09,220 --> 00:07:12,600 We just are not used to it or we simply don't know what is it. 106 00:07:12,610 --> 00:07:15,040 And this is why we are maybe not. 107 00:07:15,280 --> 00:07:18,850 Well, we maybe just don't understand what is it to be able to see it. 108 00:07:19,630 --> 00:07:20,000 All right. 109 00:07:20,010 --> 00:07:24,490 So let's thing would be, what are the different types of machine learning that exists? 110 00:07:24,490 --> 00:07:26,710 So there are three types of machine learning that exists. 111 00:07:27,250 --> 00:07:32,410 We have supervised learning and basically when we talk about supervised learning, it could be training. 112 00:07:32,570 --> 00:07:39,100 Well, if we want to understand and have the definition of supervised learning, it will be training 113 00:07:39,110 --> 00:07:45,980 an algorithm and pick the model that will be the best to predict some outputs based on inputs of data. 114 00:07:46,720 --> 00:07:52,090 So, as I said, basically you have an input and you want to have a certain output. 115 00:07:52,100 --> 00:07:56,710 So you will train your system to be able to predict this output. 116 00:07:57,140 --> 00:08:02,390 So as is an example, we can think of simply facial recognition on pictures. 117 00:08:03,010 --> 00:08:04,300 This could be a good way. 118 00:08:05,200 --> 00:08:08,100 So basically how all this would work behind the scene. 119 00:08:08,710 --> 00:08:11,680 So the system will receive multiple inputs and outputs. 120 00:08:11,680 --> 00:08:14,740 And just the job of the system is pretty simple. 121 00:08:15,370 --> 00:08:22,210 It will be to map all well, to be able to create a map or basically a route from the inputs to the 122 00:08:22,210 --> 00:08:22,710 output. 123 00:08:23,050 --> 00:08:25,000 And it has to be the most optimized possible. 124 00:08:25,360 --> 00:08:29,930 And the more the system will be trained in our case, well, the more it will be effective. 125 00:08:29,950 --> 00:08:35,500 So basically, the more you train your system, the more you give him information to be able to understand 126 00:08:35,500 --> 00:08:42,640 this information and transform it, the more the system will be good and will find the right answers 127 00:08:42,640 --> 00:08:44,200 and bring you to the right output. 128 00:08:45,100 --> 00:08:45,490 All right. 129 00:08:45,490 --> 00:08:46,160 Same thing. 130 00:08:46,180 --> 00:08:47,580 Be unsupervised learning. 131 00:08:48,040 --> 00:08:55,360 So basically the difference between supervised and unsupervised is that there is no outcome to predict 132 00:08:55,360 --> 00:08:57,380 in the unsupervised learning. 133 00:08:57,400 --> 00:09:06,310 So basically this type of learning is done with unlabeled data, if we can see this week and to find 134 00:09:06,310 --> 00:09:08,210 uncovered hidden structures. 135 00:09:08,500 --> 00:09:12,670 So basically, it's harder to use and is, well, less used. 136 00:09:12,670 --> 00:09:19,840 Obviously, it's not as used as supervised learning and usually it can be used before the supervised 137 00:09:19,840 --> 00:09:20,280 learning. 138 00:09:20,290 --> 00:09:22,600 So simply to well. 139 00:09:23,560 --> 00:09:28,660 To provide information about the potential outcome and how to reproduce it. 140 00:09:28,690 --> 00:09:34,270 So basically, if you don't know the outcome, you lose, you will use unsupervised learning simply 141 00:09:34,270 --> 00:09:40,500 to maybe have an idea of how you want the outcome to be or how you want to get the outcome. 142 00:09:40,870 --> 00:09:42,670 And after that, it's supervised learning. 143 00:09:42,670 --> 00:09:44,290 You have a certain idea of the outcome. 144 00:09:44,620 --> 00:09:48,840 You can try to train your machine to be able to reach that outcome. 145 00:09:50,200 --> 00:09:52,330 Then the last thing will be reinforcement learning. 146 00:09:52,660 --> 00:10:00,400 And basically reinforcement learning is all about teaching suitable actions to maximize results in a 147 00:10:00,400 --> 00:10:02,400 particular situation. 148 00:10:02,410 --> 00:10:08,320 So in other words, basically what you want to do is really train your machine to be as optimized as 149 00:10:08,320 --> 00:10:12,270 possible so it will learn from errors, as it says right here. 150 00:10:12,280 --> 00:10:19,030 So basically you want to have something that is well optimized, the max and will simply be able to 151 00:10:19,030 --> 00:10:21,320 adapt in any type of situation. 152 00:10:21,520 --> 00:10:27,130 So basically reinforcement learning, there is no interest, but their enforcement agent decides what 153 00:10:27,130 --> 00:10:32,700 to do to have well to to optimize the realization of the task. 154 00:10:33,310 --> 00:10:38,020 So basically, we can see some examples right here so we can talk about real time decisions. 155 00:10:38,680 --> 00:10:41,290 We can talk about skill acquisition. 156 00:10:41,290 --> 00:10:43,110 We can talk about robot navigation. 157 00:10:43,480 --> 00:10:45,010 So those are really more advanced things. 158 00:10:45,040 --> 00:10:47,950 And basically you have a system that is already in place. 159 00:10:48,250 --> 00:10:50,770 And what you want to do with this system, you want to optimize it. 160 00:10:50,770 --> 00:10:56,920 So basically when you want to optimize your system, you will not use supervised or unsupervised learning. 161 00:10:56,920 --> 00:11:03,610 You will really use reinforcement learning, which is the thing that is used to be able to optimize 162 00:11:03,610 --> 00:11:05,320 to the max your system. 163 00:11:05,980 --> 00:11:12,040 So right now, I hope you guys have a basic and well basic introduction to what is exactly machine learning 164 00:11:12,040 --> 00:11:13,360 and how it works. 165 00:11:13,690 --> 00:11:19,690 And in the next classes, we are going to start talking about some of the machine learning algorithms 166 00:11:19,690 --> 00:11:20,550 that exist. 167 00:11:20,920 --> 00:11:24,220 So that's the first thing that goes into all the next class.