The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

What Is Machine Learning? An Intro for Beginners

--

https://pixabay.com/photos/artificial-intelligence-robot-ai-ki-2167835/

Artificial Intelligence and Machine Learning

Machine Learning (ML) is part of a bigger field in Computer Science called Artificial Intelligence (AI). There is no consensus on what human intelligence is so, what does intelligence mean when we are talking about machines?
In 1950, Alan Turing, considered as the father of Artificial Intelligence and creator of the Turing Machine, the first general-purpose computer, designed an experiment (The Imitation Game) in which a human had to decide if his interlocutor was human or not. The machine would be considered to be intelligent if it could articulate answers that would make them indistinguishable from a human’s. This would prove that the machine could think. He thought it would take humans around 50 years to be able to build a machine that could win at this game. He conceived such a machine as a child’s mind that could learn.

A Definition of Machine (or Automated) Learning

According to ML pioneer Arthur Samuel (1959), ML is the field of study that gives computers the ability to learn without being explicitly programmed. To understand this, we need to clarify what learning means. Tom Mitchel (1998) stated that “a computer is said to learn from experience E concerning Task T and some performance measure P if its performance P gets better with experience E.” ML is a group of methods and algorithms to achieve AI. It is a method to educate or train a program. The main goal of ML is to help a program identify patterns from a dataset and then be able to predict new outcomes when presented with new data. It does not, however, try to imitate intelligent behavior as AI does.

When to Use ML? How to Choose the Best Algorithm?

ML should be used when a task is too complex to be performed by humans (such as identifying hidden patterns in large amounts of data) or when it requires adaptivity (i.e. software based on voice-recognition). Now, once you have decided that ML is the appropriate tool to handle a problem, it’s necessary to choose the right algorithm. There are a group of tradeoffs that need to be considered: first, the size of the dataset has an impact on the way an algorithm performs depending on the number of features to handle, the variance (a measure of how disperse the data is) and the bias of the data (a tendency to encourage an outcome more than others); second, accuracy and interpretability; third, restricted (linear regression) vs flexible algorithms; fourth, speed or training time vs accuracy; fifth, assumption of linearity in the dataset; finally, the number of features with respect to the number of data points.

ML Algorithms

Supervised learning

This is the most similar to human learning with the supervision of a teacher. Just like a teacher provides examples of problems with their solutions for the student to infer general rules to solve similar problems in the future, supeervised learning uses labeled data, for the program to learn by analyzing data and identifying patterns to be able to predict an output in a variable.

Some common techniques are regression and classification. An example of the former is Linear Regression; it is used to predict and find relationships between quantitative data. In this kind of learning, statistics play an important role in the analysis of data. Example: prediction of prices given a data set that includes labeled data such as the number of rooms, size, age, and look at the prices and try to predict these prices. In the graph below, we are trying to find a model that adequately correlates input variable x (size of a property) and output variable y (price). The dots are the data (examples) we have to train the algorithm. Using ML techniques, the algorithm can find different combinations of b0 ( the point where the graph intersects y-axis) and the slope m that minimize the error (the distance from the dots and the regression line).

Example of linear regression. x (size in square feet), y (price of property)

Classification techniques, on the other hand, can be used to predict a response (qualitative data) by finding patterns in a dataset. Some examples of classification techniques are the following: Logistic regression, Linear discriminant analysis, K-nearest neighbors, Decision Trees, Neural Networks, and Support Vector Machines. Example: let’s use Decision trees to determine the price of a property based on its number of rooms and its size. The algorithm should be able to determine how to split at the root to have the best prediction performance with the minimum splits.

https://www.kaggle.com/dansbecker/how-models-work

Unsupervised learning

It also learns from examples which used unlabeled data but there is no associated response. The algorithm learns the patterns without supervision (models). This algorithm can use a technique called clustering to group features that are similar and it can be used in recommendation systems. It can suggest additional products based on what people (that are similar to you according to the algorithm) also liked or bought.

https://mapr.com/blog/apache-spark-machine-learning-tutorial/

Semi-supervised learning

This kind of algorithms combined labeled and non-labeled data for its training. This algorithm can use the labeled data to infer the rules and then label the non-labeled data to train and then learn from its mistakes and add this non-labeled data to the set of labeled data. The example below illustrates a classification algorithm which uses part of the data to teach explicit rules to classify the data and uses the rest of the data without any labels for the algorithm to practice labeling. Both forms of training will be the input for the final classifier algorithm.

https://quantumcomputingtech.blogspot.com/2019/09/semi-supervised-learning-algorithms.html

Reinforcement learning

In this kind of learning, there are no labels or associated responses but the algorithm is rewarded or punished if it succeeds or fails at making a good decision which has an impact on a variable we want to optimize. This is similar to human learning by experimenting or by trial and error. For example, computers learning to play a game like chess and learning which moves help them win and which ones they should avoid or learning from moves that score them the most points.

https://marutitech.com/businesses-reinforcement-learning/

Deep (Neural) learning

This kind of learning involves a hierarchical level of artificial neural networks capable of learning unsupervised from data that is unstructured or unlabeled. It imitates the way humans process information in order to make decisions. Deep learning doesn’t require a “teacher” to identify which labels are relevant for the algorithm to learn. It identifies the relevant labels itself. Deep Learning takes longer but it is usually more accurate. There are some disadvantages in these algorithms though. It needs large amounts of data, and large computing capacity. Additionally, it can reproduce undetected bias present in the data. Example, computer vision, which involves image detection and classification. In the image below, we can observe how each layer of neurons has an increasing level of abstraction. The first level trains to identify lines, it then passes this output to the second layer which identifies body parts and the final layer, identifies facial features to make a final prediction.

https://karmaadvisory.com/deep-learning-basics/

Applications in different fields

Finance: fraud detection, assistance in stock market investing

Business: Business Intelligence: analyzing costumer satisfaction, identifying market trends, customer service chatbots, resource allocation, prediction of wait times, marketing

Lingüistics: speech-to text software, voice recognition, textual analysis, automated translation, text prediction

Security: facial recognition

Transport: security systems, self-driving cars

Health Care: assisted diagnosis, screening tests

Education: smart tutors which learn from the students’ learning styles and choose learning activities and contents accordingly.

Tools

Python libraries: pandas for preliminary statistical analysis and data preparation, seaborn for data visualization, scykit for machine learning algorithms, TensorFlow and Pytorchfor deep learning

Sources

Andrew Ng. What is Machine Learning
Retrieved from https://www.youtube.com/watch?v=PPLop4L2eGkon July 1st, 2020

JJiawei Han, … Jian Pei, in Data Mining (Third Edition), 2012. Retrieved from https://www.sciencedirect.com/topics/computer-science/unlabeled-data on July 2nd, 2020

Regression Analysis. http://www.sthda.com/english/articles/40-regression-analysis/165-linear-regression-essentials-in-r/ Retrieved on July 2nd, 2020

A Guide to Chose the Right Machine Learning Algorithm. Retrieved from https://www.kdnuggets.com/2020/05/guide-choose-right-machine-learning-algorithm.html on July 4th, 2020

A. M. TURING, I. — COMPUTING MACHINERY AND INTELLIGENCE, Mind, Volume LIX, Issue 236, October 1950, Pages 433–460, https://doi.org/10.1093/mind/LIX.236.433

M. MOHRI et al. Foundations of Machine Learning, 2nd edition, MIT Press, Cambridge, MA, 2018

S. SHALEV-SHWARTZ. Understanding Machine Learning. From Theory to Algorithms. Cambridge University Press, Cambridge, MA, 2014

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Sandra Macias
Sandra Macias

Written by Sandra Macias

Software developer, philosopher and educator.

No responses yet