Machine Learning for my Grandpa…

Deyber Castañeda
13 min readNov 9, 2020

Grandparents are amazing, we love them so much. They have a lot of knowledge and almost an answer for everything. It’s easy to talk with them about any topic except when you try to talk with them about how does FaceApp works, since this App works with machine learning algorithms.
¿How to explain such a complex topic to your grandfather that have not a background in STEM?
The first part is to use a not too technical language in order to avoid that you stay talking alone.

The second part is to clarify what is and what is not machine learning. For the sake of this article I’ll be referring to you, the reader, as my grandpa.

What is Machine Learning?

Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed. Remember that computers are very dumb, since we must give instructions to them in order to do something. Basically what machine learning is looking for is to create programs so that we don’t need to give each instruction to our computer, if we achieve this so we say that we are creating an artificial intelligence since we got an entity that take information and do some “rational” thing by itself. It is a very exciting and growing field as it makes computers more similar to humans.
Do you remember Netflix and Facebook? Well, they use a lot of this kind of things. For example, when you upload a photo to your Facebook account they can suggest you to tag someone that might be in the photo, or when you are are looking for a movie to watch in Netflix they can suggest you some movie that you might like. So you don’t need necessarily someone that tell you who is in the photo or tell you about a new movie that could enjoy. Hopefully this is making a lot of sense because we haven’t got into the best parts of machine learning. One thing is for sure though, it will play a huge role in our lives going forward.

Machine Learning is very similar to human learning. Think about the way as children learn, you give them information and when they do or say something wrong you make them an advise. In the case of Machine Learning the child is a program to which a programmer give data, this data should be structured. When the program receives feedback it try to verify or correct the model.

Through data input and certain commands, the computer is enabled to “learn” to identify certain objects (persons, objects, etc.) and to distinguish between them. For this purpose, the software is supplied with data and trained. For instance, the programmer can tell the system that a particular object is a human being and another object is not a human being . The software receives continuous feedback from the programmer. These feedback signals are used by the algorithm to adapt and optimize the model. With each new data set fed into the system, the model is further optimized so that it can clearly distinguish between “humans” and “non-humans” in the end.

Machine Learning is a sub-area of artificial intelligence, whereby the term refers to the ability of IT systems to independently find solutions to problems by recognizing patterns in databases. In other words: Machine Learning enables IT systems to recognize patterns on the basis of existing algorithms and data sets and to develop adequate solution concepts. Therefore, in Machine Learning, artificial knowledge is generated on the basis of experience.

In order to enable the software to independently generate solutions, the prior action of people is necessary. For example, the required algorithms and data must be fed into the systems in advance and the respective analysis rules for the recognition of patterns in the data stock must be defined. Once these two steps have been completed, the system can perform the following tasks by Machine Learning:

  • Finding, extracting and summarizing relevant data
  • Making predictions based on the analysis data
  • Calculating probabilities for specific results
  • Adapting to certain developments autonomously
  • Optimizing processes based on recognized patterns

What is no Machine Learning?

Machine learning is not robots out coming to destroy humans like you see in the movies. Terminator is the first thing you may think of when the words artificial intelligence or AI come to mind. That’s another thing I want to talk about to you. Machine learning is not artificial intelligence, but a subset of AI. This field has been around for quite some time, with the roots going back to the late 1950s. During that time period IBM’s Arthur L. Samuel created the first machine learning application, which played chess.

You always need a Terminator picture when explaining evil A.I.

Another buzz word you probably heard, which often gets confused with machine learning as much as AI — that is, deep learning. Deep learning has been around just as long as machine learning, but it wasn’t until the 1980s that the field gained traction. Eventually the big companies like Facebook, Google, and Microsoft would invest heavily in the technology. The result has been a revolution for AI. For example, things like Google Translate or Apple’s Siri are examples of the power of the technology. I won’t get into what AI or deep learning is as machine learning is already a big subject to cover by itself. Just know there is no threat with machine learning, maybe with AI though if it gets out of hand.

How To Get Machines To Learn

So you might be thinking how exactly do we get these machines to learn? How does a computer collect all this information and make sense of it? Well I can tell you that there’s a lot of math involved and computer algorithms to help produce the desired results. Alright grandpa, I’m gonna break it down a simple as I can for you, but at the same time explain in detail what is under the hood of a learning machine.

The Math That Comes With Machine Learning

Math was never my favorite subject, but we’ve all come across linear algebra. Linear algebra is a field of mathematics that is universally agreed to be a prerequisite to a deeper understanding of machine learning. Although linear algebra is a large field with many esoteric theories and findings, the nuts and bolts tools and notations taken from the field are practical for machine learning practitioners. With a solid foundation of what linear algebra is, it is possible to focus on just the good or relevant parts. Math is important in this field because you need to know which algorithms to include when considering accuracy, training time, and a bunch of other stuff.

The math just helps us find a way to help the machine learn and make sure it does it in the best way possible. Other than linear algebra a scientist/engineer will also need to know the mathematical concepts of Calculus, algorithms, probability theory and statistics. Python is the most used programming language in this field as well. A beginner doesn’t actually need a whole lot of math to get started in this field.

Think how does brain works

The world has a lot of information and our brain takes it all in to form our view of reality. A computer has to be able to do the same and that’s where a neural network comes into play. Neural networks is the most popular way to get a computer to mimic a human brain. Our brains are really good at solving problems, but each neuron is responsible for solving a tiny part of that big problem. Think of it as an assembly line where each neuron in your brain has a certain job to do to solve a problem. So their inspired by the brain, but in neurons in our brain.

what way are neurons linked together? Your brain is made up of approximately 100 billion nerve cells and those are called neurons. They have this cool ability to collect and send signals. Think of it like a network with a bunch of wires.

A neuron takes in inputs and produces outputs. The input nodes (input layer) provide information from the outside world to the network. Similar to how your eyes sees and collects information and sends it to the brain. The output nodes (output layer) are the ones responsible for communicating that information back to the outside world. Let’s say that the network below is trained to recognize digits. So if give a number in the input layer that will go through the hidden layer and then come out the output layer as the number being recognized. The neurons in the hidden layer are going to communicate the information they got from each other to best piece together what number they think is being passed. Each layer influences the next.

Things can get even cooler when you are training to network for other things like audio recognition. Parsing speech or breaking down audio and picking out distinct sounds, which combines to make certain syllables, to certain words, phrases, and etc. This is how you wanna think of it when building your own network.

  • convolutional network — for image recognition
  • long short-term memory network- good for speech recognition

Machine learning uses two types of techniques: supervised learning, which trains a model on known input and output data so that it can predict future outputs, and unsupervised learning, which finds hidden patterns or intrinsic structures in input data.

Figure 2. Graphic representation of Supervised and Unsupervised lerning

Supervised Learning

Supervised machine learning builds a model that makes predictions based on evidence in the presence of uncertainty. A supervised learning algorithm takes a known set of input data and known responses to the data (output) and trains a model to generate reasonable predictions for the response to new data. Use supervised learning if you have known data for the output you are trying to predict.

Supervised learning uses classification and regression techniques to develop predictive models.

Classification techniques predict discrete responses — for example, whether an email is genuine or spam, or whether a tumor is cancerous or benign. Classification models classify input data into categories. Typical applications include medical imaging, speech recognition, and credit scoring.

Use classification if your data can be tagged, categorized, or separated into specific groups or classes. For example, applications for hand-writing recognition use classification to recognize letters and numbers. In image processing and computer vision, unsupervised pattern recognition techniques are used for object detection and image segmentation.

Common algorithms for performing classification include support vector machine (SVM), boosted and bagged decision trees, k-nearest neighbor, Naïve Bayes, discriminant analysis, logistic regression, and neural networks.

Regression techniques predict continuous responses — for example, changes in temperature or fluctuations in power demand. Typical applications include electricity load forecasting and algorithmic trading.

Use regression techniques if you are working with a data range or if the nature of your response is a real number, such as temperature or the time until failure for a piece of equipment.

Common regression algorithms include linear model, nonlinear model, regularization, stepwise regression, boosted and bagged decision trees, neural networks, and adaptive neuro-fuzzy learning.

Unsupervised Learning

Unsupervised learning finds hidden patterns or intrinsic structures in data. It is used to draw inferences from datasets consisting of input data without labeled responses.

Clustering is the most common unsupervised learning technique. It is used for exploratory data analysis to find hidden patterns or groupings in data. Applications for cluster analysis include gene sequence analysis, market research, and object recognition.

For example, if a cell phone company wants optimize the locations where they build cell phone towers, they can use machine learning to estimate the number of clusters of people relying on their towers. A phone can only talk to one tower at a time, so the team uses clustering algorithms to design the best placement of cell towers to optimize signal reception for groups, or clusters, of their customers.

Choosing the right algorithm can seem overwhelming — there are dozens of supervised and unsupervised machine learning algorithms, and each takes a different approach to learning.

There is no best method or one size fits all. Finding the right algorithm is partly just trial and error — even highly experienced data scientists can’t tell whether an algorithm will work without trying it out. But algorithm selection also depends on the size and type of data you’re working with, the insights you want to get from the data, and how those insights will be used.

Figure 3. Machine learning techniques.

Advantages of Machine Learning

Machine Learning undoubtedly helps people to work more creatively and efficiently. Basically, you also can delegate quite complex or monotonous work to the computer through Machine Learning — starting with scanning, saving and filing paper documents such as invoices up to organizing and editing images.

In addition to these rather simple tasks, self-learning machines can also perform complex tasks. These include, for example, the recognition of error patterns. This is a major advantage, especially in areas such as the manufacturing industry: the industry relies on continuous and error-free production. While even experts often cannot be sure where and by which correlation a production error in a plant fleet arises, Machine Learning offers the possibility to identify the error early — this saves downtimes and money.

Self-learning programs are now also used in the medical field. In the future, after “consuming” huge amounts of data (medical publications, studies, etc.), apps will be able to warn a in case his doctor wants to prescribe a drug that he cannot tolerate. This “knowledge” also means that the app can propose alternative options which for example also take into account the genetic requirements of the respective patient.

Machine Learning: The technology leaders

In addition to Microsoft, Google, Facebook, IBM and Amazon, Apple also spends enormous financial resources on the use and further development of Machine Learning. IBM’s Watson supercomputer is still the best-known appliance for Machine Learning. Watson is mainly used in the medical and financial sectors. As already mentioned, Facebook uses Machine Learning for image recognition, Microsoft for the speech recognition system Cortana, Apple for Siri. Of course, Machine Learning is also used at Google, both in the area of image services and search engine ranking.

Cloud providers such as Google, Microsoft, Amazon Webservice and IBM have now created services for Machine Learning. With their help it is also possible for developers who do not have specific Machine Learning knowledge to develop applications. These applications are able to learn from a freely definable set of data. Depending on the provider, these platforms have different names:

  • IBM: Watson
  • Amazon: Amazon Machine Learning
  • Microsoft: Azure ML Studio
  • Google: Tensorflow

Disadvantages of Machine Learning

With all those advantages to its powerfulness and popularity, Machine Learning isn’t perfect. The following factors serve to limit it:

Data Acquisition

Machine Learning requires massive data sets to train on, and these should be inclusive/unbiased, and of good quality. There can also be times where they must wait for new data to be generated.

Time and Resources

ML needs enough time to let the algorithms learn and develop enough to fulfill their purpose with a considerable amount of accuracy and relevancy. It also needs massive resources to function. This can mean additional requirements of computer power for you.

Interpretation of Results

Another major challenge is the ability to accurately interpret results generated by the algorithms. You must also carefully choose the algorithms for your purpose.

High error-susceptibility

Machine Learning is autonomous but highly susceptible to errors. Suppose you train an algorithm with data sets small enough to not be inclusive. You end up with biased predictions coming from a biased training set. This leads to irrelevant advertisements being displayed to customers. In the case of ML, such blunders can set off a chain of errors that can go undetected for long periods of time. And when they do get noticed, it takes quite some time to recognize the source of the issue, and even longer to correct it.

The Challenges And Limitations

As awesome as machine learning is there are limitations to it. I’ll bring up the biggest ones I think need to be overcome for this technology to continue to move forward. So machine learning algorithms require massive stores of training data and labeling that data is a tedious process. You need to make sure that the data being fed into the machine is labeled. If not, it is not going to get smart over time. An algorithm can only develop the ability to make decisions and behave in a way that is consistent with the environment which is required to navigate. Machines also can not explain themselves and that can be difficult when you want to know why that particular decision was made and how. Lastly, and I think this one is the most important, is to avoid bias. Transparency is important and unbiased decision making builds trust. For example, facial recognition has a large part in social media, law enforcement, and other applications. But biases in the data sets provided by facial recognition can lead to inexact outcomes. If bias finds its way into an algorithm and data sets and the training data is not neutral the outcomes will inherently amplify the discrimination and bias that lies in those data sets.

Summary

As we saw above Machine Learning is a broad field of study and it will have an important roll in our future. Maybe everyday you use machine learning but now is time understand it.
Do you think that your grandfa could understand this way of show the amazing world of Machine learning?
Tell me in the comments.
Here are some resources where I found elements for this article:

--

--

Deyber Castañeda

Software Developer and Science lover always learning.