Sharing My Knowledge on Machine Learning!

Victor Rivera
7 min readJul 5, 2020
All credit goes to their respective creators. Skynet DID NOT hack your computer or this article.

If there is one franchise that has left a mark on many generations, from young to old, it would have to be The Terminator. The idea of an A.I creating an army on it’s own will to destroy Humanity is both as terrifying as it is super cool! An A.I becoming nearly sentient from how much it has learned and grows from begged a lot of questions for audiences around the world, even innovated amazing inventions like Drones and Robots in real life. One of the questions, which will lead into my explanation on this topic goes something like this:

How was Skynet made?

The answer is: through Machine Learning and the implementation of it’s many concepts.

So in this blog I will be covering Machine Learning and the many pieces that hopefully paint a clear picture and understanding of what is it.

First and foremost is an explanation of Artificial Intelligence, A.I for short, as it is the forefather to Machine Learning. The idea behind Artificial Intelligence is a machine that can perform tasks that are a trait of Human Intelligence. For example, let’s say we want to build a Robot that will be an assistant to a Scientist. At it’s core, it would contain a program or simply put, a set of instructions to do it’s task. Yet the same time, it would have traits of our Human Intelligence, making it judge and act out it’s programming based on it’s analysis. This would be a use of a concept called General A.I, where the machine utilizes all of our brain’s traits like planning, counting, learning, problem solving and more.

There is another concept under Artificial Intelligence and that would called Narrow A.I. This is the idea of the machine using only some traits of Human Intelligence, where it would perform effectively at certain task it is built for and nothing else. An example of this would be a Robot that creates the body of a car. It is programmed simply shape metals into the image fed to it, it cannot do anything else like serve coffee (though it would be generous) since it is built and programmed solely for building the body of a car.

A more colorful explanation that recaps the paragraphs prior. From https://analyticsindiamag.com/what-is-narrow-ai-how-it-is-different-from-artificial-general-intelligence/

I hope the explanation on Artificial Intelligence made sense because in this section, I will be talking about Machine Learning itself!

Machine Learning is a part of Artificial Intelligence and very simply put: a way of achieving A.I. Now what has to be done to make ML (An abbreviation for Machine Learning) to work is the use of something called Algorithms.

Algorithms are a set of clear and direct instructions used by computers to either calculate or problem solve. In the case of Machine Learning, the machines learn and grow from the data fed to it, analyzing and producing specified results based off of the task it was designed for. On the topic of algorithms, there are 8 main types used for Machine Learning in general, which are the following:

Linear Regression
Logistic Regression
Decision Trees
Support Vector Machines
K-Nearest Neighbors
Random Forests
K-Means Clustering
Principal Components Analysis

In ML, Linear Regression is an algorithm that is used to find the relationship between two types of data and creates a prediction value based on the two. An example of this would be a graph where the x(axis) is the data to feed to the algorithm and y(axis) is the output which the machine creates based on the prediction value. This graph could be taking in information like years working in a company and the algorithm would output a prediction of the raise in salary.

Logistic Regression is a categorizing algorithm used to assign notable changes or differences to a set of classes. This kind of algorithm transforms it using a function called the “logistic sigmoid function” and returns or gives us a probability in the form of a value.

Here are the two types of Logistic Regression. Picture from https://towardsdatascience.com/introduction-to-logistic-regression-66248243c148

So what the Sigmoid Function does is map any real value into another value between 0 and 1. In Machine Learning, it is used to map predictions to probabilities.

Next is Decision Trees. The decision tree algorithm is a program that finds many different outcomes and paths based on a test. Weather is a perfect example, where a Decision Tree will find the best possibility of the weather based on the factors of the day.

From geeksforgeeks.org

Support Vector Machines are supervised learning programs that use a combination of different learning algorithms that analyze data passed to it for regressive analysis and classification. In layman’s terms, it’s a machine that’s learning from these different data entries, watched by a human by the way, and said data is taken for study.

K-Nearest Neighbors is a algorithm that basically stores all of the cases that it is passed to it and creating new ones based on the distance functions. It’s kind of like taking into consideration every neighbor in the neighborhood and creating new neighbors based on circumstances and distance.

Random Forests is a algorithm that builds many decision trees, ultimately creating a forest of learning models that protects it from errors. It merges the different trees together to create a more stable and accurate prediction. The pictures are very interesting and fun to look at, like this one:

This has me craving some fruit right about now! From https://www.javatpoint.com/machine-learning-random-forest-algorithm

Now we are on K-Means Clustering. So first and foremost, clustering is just a collection of data points gathered and summarized due to how similar they are. The K-Means algorithm does repetitive calculations on a randomly selected beginning point and produces the most optimized position of that beginning point. The technical term for the beginning points is called centroids. There are two cases the Algorithm watches out for, stopping when it is either of these two cases: When the specified repetition of calculations is met or the centroids have been stabilized — meaning the clustering was successful and there was no change in their values.

And finally, Principal Components Analysis. There is much to cover on this specific algorithm and the first term to define is dimensionality. Dimensionality in statistics is the amount of attributes a dataset has. Imagine a Fruit Basket as the dataset and each different fruit is the attribute of this dataset. So what the Principal Components Analysis alogrithm does is reduce or cut down on the dimensionality of the datasets, making it easier for us humans to read without sacrificing information to do so.

Finally we talked about the 8 different algorithms used for Machine Learning, now to talk about another field of Artificial Intelligence which might paint Skynet’s picture much clearer.

There is one more subfield of A.I and that would be named Deep Learning.

Deep Learning is a network which learns from unstructured data that would take decades for us Humans to decipher and keep up with. How it works is it collects all of this data from the Internet, the melting pot of information, and extracts it’s data.

Next is something that might piece together the mystery of Skynet and is:

Neural Network.

Neutral Network is a system modeled after the human brain and in the case of Artificial Intelligence; a powerful collection of either natural or artificial neurons that use either a mathematical or computational model to process information. Where the Machine IS a brain and contains many many programs that allow it to function similarly to our own brain. These are used to study data and information in a general sense, with the flexibility of it being Supervised or Unsupervised.

There are mathematics in Machine Learning and they are the following:

Linear Algebra

Probability Statistics and Theory

Multivariate Calculus

and Algorithms and Calculus.

Along with others.

Linear Algebra is a sort of mathematics that allows you to detail coordinates and interactions of planes, like a X and Y graph, and do operations on them. They are then represented as matrices and vectors.

Probability Statistics and Theory is the mathematics behind probability and the analysis of random occurrences. We create sets of instructions for the machine and programs to deal with unforeseen events, like when an apple will fall off an apple tree. The computer will handle that prediction.

Multivariate Calculus is calculus with multiple variables. It helps us explain the relationship between a input and output variable, like the salary a person would make depending on their work experience.

Algorithms and Calculus is simply mathematics that have to do with both. We have to use these mathematics in Machine Learning to create those programs dealing with sorting through data, predictions, learning, problem solving and more.

And that is the end of my blog. I hope I was able to unravel the truth behind Skynet and effectively explain Machine Learning to you. Remember;

Kyle Reese: Listen, and understand! That Terminator is out there. It can’t be bargained with. It can’t be reasoned with. It doesn’t feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead! From The Terminator.

--

--

Victor Rivera
0 Followers

Hey there, I'm Victor. I'm a student at Holberton School for Software Engineering!