Fundamentals to know before you start studying Machine Learning!
Introduction
Lately, the words “machine learning” and “deep learning” are common. You might already know it can forecast sales, identify images, and drive autonomous vehicles.
Indeed, it is an amazing technology, but if you search for “Learn machine learning and deep learning!”. As you might find, most tutorials start with TensorFlow or something similar, you suddenly hit a wall.
So… What the heck are these concepts and what do I do with them?
Machine learning is popular recently, but it is a technology with some history. In fact, the first neural network was created in 1951.
Here is an overview of machine learning terms.
About artificial intelligence (AI)
The word artificial intelligence (AI) first appeared in 1956.
AI is “a computer-based software or system that simulates the intellectual work performed by humans.”
For example, a system that can do things like:
- Understand the words spoken by humans
- Make logical inferences from data
- Learn from experience
- Make decisions
- Navigate through a path, etc.
Also, there are two major types of AI,
- “General-purpose AI” with human sensibility and judgment ability
- “Specialized AI” that has processing power equal to or better than human in a specific task.
In this article, we focus on the latter. “Machine learning” is a method for specialized AI to improve processing power.
Additionally, we have described Deep Learning later on as one of the technologies to within AI.
Since AI is a concept which contains machine learning and deep learning, which will be described later, the relationship is as follows.
Machine learning
Machine learning is a subset of AI. It can improve the potential and power of AI. It is “a technology that attempts to achieve human learning through experience using computers”.
More specifically, a system can “learn iteratively from data, find patterns and features, and make predictions against unknown data.”
An often used example is image recognition. It discovers the features of an image by ‘learning’ on images. For example, after training it on images of cars, it can identify a new image as a car too.
Next, let’s look at learning methods in machine learning.
Learning methods in machine learning
There are several types of learning methods for machine learning. We will briefly explain them.
Supervised learning
This is a method for associating data with features in advance and predict the classification of unknown data.
We can use it to “predict what may happen in the future using past data”.
For example, “Spam mail classification” or “Tomorrow’s weather forecast”
Technically, supervised learning is about learning the relationship between input and output. We create a function between input and output data based on past data. The target is to create a function that approaches the target output data. Then it applies the function to the unknown data and predicts
Unsupervised learning
This learning method is a learning method where we don’t give output data at the time of learning. It is a characteristic method of finding regularities from data without giving an output that is correct.
(For supervised learning, it is also necessary to give “outputs” as input.)
For example, recommendation functions on EC sites and grouping of users by order history.
Reinforcement Learning
Some time ago there was news that Google’s AlphaGo AI won against world champion Lee Sedol. This was using an AI trained using reinforcement learning.
Reinforcement learning does not give clear answers as unsupervised learning. Instead, there are “actions” and “rewards”.
As a result, the AI will learn “What kind of action shall I take to maximize the accumulated reward?”.
For example, in the case of playing a game, the target will be “How to approach the goal without mistakes or try various actions .”
As a result, we will be able to get close to the goal (Until we can finally reach the goal). Also, we will be able to achieve the goal even though we do not know the specific method.
The combination of Deep Learning (neural network) and reinforcement learning (described later) is sometimes called “deep reinforcement learning”.
We can use reinforcement learning for playing games, robot behavior, AI for games such as Go and Chess, etc. There are various types of algorithms, such as “Q-Learning”, “Monte Carlo”, and “SARSA”
Deep Learning
Well, here is the story of Deep Learning.
Deep Learning is an evolution of machine learning. It is a method for analyzing and learning data using a “neural network” modeled on human neurons.
Here are some practical examples for which Deep Learning has been very accurate.
- Object detection
- Semantic segmentation (classification at the pixel level for images)
- Image caption generation
- Image style conversion
- Self-driving
- Face detection and recognition
- Expression recognition, etc
By learning a large amount of data with this learning method, the AI will learn by itself what parts of the data it should focus on.
Neurons and perceptrons
Now, let us look at the important technologies that form the basis of Deep Learning, Neural Networks.
A neural network is a computerized model of neurons (and connections between neurons) in the human brain.
It is a mathematical model of the mechanism in the brain. In this model, we transmit the signals received from one neuron to the next neuron after exceeding a threshold.
Then, we make a perceptron: a structure in which we combine these neurons in parallel and then bundle them by a large number of neurons. Finally, a combination of perceptrons is a neural network.
Neurons
They are the cells that make up the nervous system. Information is transmitted by the connections of many nerve cells in the brain.
Basically, neurons are made up of soma, axon
The term “neuron” in a neural network refers to an artificial neuron in the neural network represented by a mathematical model.
Perceptron
An algorithm that is the basis of the neural networks (deep learning).
It receives multiple signals as input and outputs one signal. (Ex. 1 or 0)
Weight and Bias
The weight (w) in a neural network represents the strength of the connection. This value changes with training.
The value of bias (b) is a kind of personality or uniqueness of neural networks and is used to bias the output value.
y=x1∗w1+x2∗w2+b
x1 and x2 are input values, w1 and w2 are weights, and b
The final output (ex. 1 or 0) will be made based on this calculation result.
Neural networks
A neural network consists of many connected perceptrons.
It consists of :
- Input layer
- Hidden layer(s) (also called middle layers, they can be multiple)
- Output layer
As shown above, each neuron is a simple mechanism. However, by combining a large number of such neurons, it is possible to perform complex function approximation (in which one function is expressed in a way that results in no difference with another function).
In addition, the hidden layer of neural network can be multi-layered.
Deep Learning is “machine learning using neural networks with multi-layered structure with many hidden layers”.
There are several types of neural networks,
- Convolutional neural network (CNN)
- Recursive neural network (RNN)
- Long and short-term memory unit neural network (LSTM)
- and so on.
For now, let’s understand that there are many types of neural networks and they are used according to their purpose.
Learning in neural networks
Learning in neural networks refers to supervised learning and unsupervised learning. Specifically, it is a task to adjust the parameters (weights and biases) so that the correct answer is given in the output layer.
The “error back propagation method” is used when training neural networks, and the “gradient descent method” is used for updating weights, but a little more detailed story about this is here or here Please refer to.
How is Deep Learning Different from Other Machine Learning?
Deep Learning is part of machine learning.
Deep Learning has multiple hidden layers of neural networks, which enables the AI to learn the features of the data deeply.
Then, as learning data (such as images and text data) is learned in this neural network, the characteristics of the data are learned automatically.
The aim is “learning the features of the data automatically”. Hence it is not necessary for humans to specify which part of the data to focus on.
For example, when we
Such a system enables Deep Learning to achieve high accuracy.
Conclusion
Now that we have the basic knowledge as the premise, we can start learning machine learning using machine learning libraries.
I hope this article was helpful.
Please leave your comments if you have questions or opinions.