Machine Learning: Classification and Regression
I’ll be back.
No, not that type of machine. Well, sort of. Not in the literal sense anyway. Machine learning is about how humans train machines to think like humans. So I guess in a sense, a machine is a cyborg in the sense that humans train machines so that we can work alongside them. The group mechanics as a whole would be a cyborg.
I was at an event at Grubhub last night for an NYC Python group meetup. Surprisingly, the topic of the night was about machine learning. The presenter did a good job of explaining and breaking it down into 2 topics. Classification and regression.
Classification
Classification is the when you feed the computer data and they group that data into various classes. For instance, if you have a bunch of pictures of different types of fruits, classification would tell you what each type of fruit is. Say apples, bananas, kiwis, etc. You feed all those pictures to the algorithm and the algorithm would tell you what the fruit in each picture is.
There’s a lot of statistics that go into this, like K nearest neighbors (KNN).
Regression
Regression on the other hand can give suggestions or make predictions based on past data. Say you feed a bunch of pictures of apples into a machine. Now the machine knows what an apple should look like. Round, red, spherical, maybe even with a cute little stem.
Now you can feed pictures of apples and oranges to the machine. But you don’t tell the machine that these new pictures are apples or oranges, meaning they’re not labeled. The machine should be able to tell which of the new pictures are oranges and which are apples.
An everyday use for this would be spellcheck or word recommendations as you type on your phone, auto-completion. Based on what you’ve typed so far, and without any knowledge of what you, the user, plan to type next, your phone can give you some recommendations to auto-complete your sentence. This would be using regression.
During the presentation, the presenter started off by using classification to recognize the outline of a person. Then, he masked or cropped out the person from the background using machine learning. The machine was able to crop people out of pictures. Next, he pasted the cropped picture of the person onto a new background, say the beach or the desert. It looked like the person was fake traveling. Now that he had the person on a fake background in one image, he repeated that for every image frame in a video so that it looked like the person was cropped into the video.
This allowed me to understand how movie studios are able to edit actors into movies using the same technique, AKA the green screen.
All this was pretty cool and further inspired me to look into what the underlying code was. How the models are coded and how the neurons are coded.
#mindblown
Till next time y’all!