Machine Learning: How does it work?


I get it. We’ve all been at that point in life where we have absolutely no idea what the heck we are doing, we just want to learn it and get it done.

Machine Learning is one of those things. It’s tedious, it’s time-taking, it’s just not something for a beginner. Or is it?

What if I told you that Machine Learning (ML) is simple. It really depends on many aspects. The programming language, software, your goal, and so many other factors. Let’s get into some basics. It will be a lot easier to understand what is going on after this! (Hopefully.)

First off, what even is Machine Learning? Machine Learning, hence its name, is all about how a certain algorithm can be created and updated to “learn” more about its own role and how to perform the tasks it is supposed to. When we think learn, we think about repeating the same thing over and over until we get it right. Well, when computers “learn”, it’s not the same thing. When computers learn, they take in many examples, usually hundreds at a time, and compare them using different methods such as Encoding & Bit Conversion, then they compare the numbers. After these numbers are compared and contrasted, the MLP (Machine Learning Program) will spit out its final results.

For example, we want to make a number recognition program. To do this, we will create a 124x124 grid. The user will draw a number, and the program will tell them which number it is closest to. How exactly does the computer do this? Well, if we draw a line going from (Row 5, Column 62), to (Row 94, Column 62), our computer can recognize it as a line. Why? Because it is picturing what pixels are filled in, and what pattern they make. We would follow these same steps to determine the difference of a 4 and a 1. A 1 only has one line, while a 4 has 3 lines! For a four, one goes up a few pixels, in the center of those few pixels will be a line going diagonal a few pixels, and then going up from the end of that diagonal line. From there, we would get a result in a table such as:

selected_pixels = [
  [64, 51], # Row 64, Column 51
  [24, 11] # You get the gist!
]

Thats quite literally how simple it can be. Of course, it takes a ton of time, a lot of examples, and the patience of a crocodile. That is one of the simplest examples of an MLP. An MLP can go from this simplicity, to quite literally the most complex looking thing on earth!


That being said, now you understand the basics! Go on and make your own example. Give it some features. Even if you can't get it the first time, you will keep on learning and growing on the topic!

Check out this link for a more in-detail cheat sheet for professionals, or if you just want a really big head start:
AI-Neural-Networks.-22.pdf (storage.googleapis.com)