Artificial Intelligence: Understanding of Machine Learning, Deep Learning, Reinforcement Learning and its Applications

Russia's space agency Roscosmos says the Skybot F-850 will serve as a "social companion" for human crew on the International Space Station. (Image credit: Androidnaya Technika)
image source-https://www.space.com/russia-launching-humanoid-robot-into-space.html

If we are talking about machine learning or deep learning or Reinforcement learning don’t forget about data. Without data we can’t imagine machine learning or deep learning. We can say that the two things which play a big role in machine learning are big data and high configuration machines (computers) with supported GPU (graphical processor unit) to train machine learning models. You can train without GPU as well but it takes a long time to build a model, it also depends on data.
Due to the high speed internet and IoT now we are able to deploy many sensors at a time and collect data on clouds. Further we can use these data to train a model via machine learning and deep learning. Nowadays there are many companies that provide internet clouds as a data aggregator. Let’s discuss each one below.

Artificial Intelligence

image source-https://www.jagran.com/uttar-pradesh/varanasi-city-humanoid-robot-sophia-in-bhu-iit-varanasi-in-technex2020-20032694.html

Artificial intelligence (AI) is the ability of a computer program or a machine to think and learn. AI is a machine intelligence which eases problems of humans and animals. It means the things we can do, machine intelligence will do for us. As we know, Sophia is a first robot that has become a citizen of Saudi Arabia. Sophia is a social humanoid robot developed by Hong Kong based company Hanson Robotics.
Still there are some challenges to design AI among which we can name:


1. Data – Data collection is a big task because we require sensors and high speed internet to collect data and more important the quality and quantity of data. Lets say if you have to design an AI replica of a human brain, you require to collect and save memories of the human brain. Right now it is impossible, but still lots of experiments are going on to save human memory in a storage.
Other issues are internet, sensors etc. to collect data from a remote area.

Image source-https://data-flair.training/blogs/big-data-applications/


2. People – There is a lack of good and knowledgeable people who understand complete requirements of AI. The reason is that we require data scientists, AI scientists, software knowledge, engineers for sensors and deployment in hardware, IT engineers for communication between sensors and clouds etc.

source-google


3. AI Algorithms – Mostly in any software training an AI model is like a black box. If you don’t understand what is going on behind this black box then you will not understand how to design an AI from scratch. You can use Python and MATLAB for AI application designing.


4. Pre-processing of Data and Data Labelling – To create an AI model we require two kinds of data which are inputs and outputs. Output can be discrete (Classification models) or continuous (Regression models). Data collected from sensors are raw data. It requires pre-processing to make the data ready for machine learning or AI models. It requires filling missing data, removing outliers from the data, filtering to remove noises. If the number of samples is not enough, then you require some pre-processing to acquire more samples for training and testing.
Data labelling is a big task because you are working on big data and you have to label each sample and assign an output for your data as a class or continuous. Some softwares like MATLAB have good inbuilt labeller apps which automate your labelling process.

Ground Truth labeler-https://in.mathworks.com/help/driving/ug/get-started-with-the-ground-truth-labeler.html


5. There are some other challenges like errors in models, proper guidance, long time training of a model for big data, so you require parallel computing tools and supported GPUs.

Machine Learning

Machine learning teaches computers to do what comes naturally to humans and animals: learn from experience. Machine learning algorithms use computational methods to “learn” information directly from data without relying on a predetermined equation as a model.
Machine Learning is also a non-parametric analytics. It means we don’t require any predetermined mathematical equation. If we have a predetermined equation, it is not a machine learning because we require to estimate parameters in equations.
There are two types of machine learning as given below.

We have to extract features from the data before feeding it to a machine learning algorithm.
Features can be anything, they depend on your data. For instance, if your data is time series then features can be median, mean, amplitude, frequency, standard deviation or spectrum features etc.

Deep Learning

Image Source-https://www.freecodecamp.org/news/want-to-know-how-deep-learning-works-heres-a-quick-guide-for-everyone-1aedeca88076/

Deep learning is also a machine learning but we don’t require to extract features manually for deep learning algorithms, for example, convolutional neural network (CNN). It means deep learning algorithms will extract features itself. See the difference between deep learning and machine learning in the figure below.

ImageSource-https://imathworks.com/discovery/deep-learning.html

There are different types of neural networks like shallow network where there is a few layers only. But in deep learning (Neural network) there are many different layers. They can be 20, 30, 60, or even more than 100. Different layers have their own task, there can be repeated layers with different filter sizes. Different filter sizes help to extract deep features from images, numeric data, text data or time series data. Designing a neural network or deep learning is based on neuron logic, same which is in human brains.

Does the Adult Brain Really Grow New Neurons? - Scientific American
image Source-https://www.scientificamerican.com/article/does-the-adult-brain-really-grow-new-neurons/


Image showing real neurons from the human brain. They have been ...
Real neurons from human brain image source-https://www.researchgate.net/figure/Image-showing-real-neurons-from-the-human-brain-They-have-been-filled-with-a-fluorescent_fig1_271556079

Applications of Machine Learning and Deep Learning

There are tremendous applications on Machine and Deep Learning. Some are given in the picture below. Deep learning applications use CNN (Convolutional Neural Network) to examine and detect cancer cells. CNN also enables self-driving cars to detect objects and learn to tell the difference between a car and a pedestrian.

Reinforcement Learning

Reinforcement learning is a machine learning. It is a goal-based approach where a machine learns to perform tasks itself and get a reward by the environment. If it chooses the correct decision then it gets a positive reward, if it chooses a wrong path (policy) then it is negatively rewarded. Like this it learns itself from mistakes and gets rewarded.
There are two basic components of the reinforcement learning that are an agent and environments. The goal of the reinforcement learning is to train an agent to complete a task within an unknown environment. Agent receives rewards and observations from the environment and takes decisions. Polices decide actions based on the observations and environments. Polices can be created using deep learning.

Understanding of Reinforcement Learning

Consider the scenario that I have to teach something to a parrot.

  • As a parrot doesn’t understand English or other human languages, we can’t tell it directly what to do. But we can follow different strategies.
  • We create a situation, and the parrot will try to respond in many different ways. If the parrot’s response is the way we want it, we will treat it with lettuce (as they like it a lot) and it will be a positive reward for the parrot.
  • Whenever the parrot is doing which we want, it will be rewarded with lettuce. So the parrot executes a similar action with more excitement in expectation of getting more rewards.
  • At the same time, the parrot will learn what to do to get a reward and what not to do.

Applications of Reinforcement Learning

  • Robotics (Self learning robots)
  • Production strategy planning
  • Machine learning and AI
  • Auto Aircraft control
  • Automation Industries
  • Medical

MATLAB Code on a Deep Learning Application

This application is a live detection of an object using pre-trained model alexnet.
Alexnet has 25 layers and is trained with one million images with 1000 classes.
Requirements:
1. Install alexnet network in MATLAB.
2. Install IP Webcam in Android Mobile.
3. Both Android mobile and MATLAB have to be connected to the same WI-FI.
4. Open IP Webcam App from your Android mobile then click ‘Start server’.
5. Run the following code in MATLAB:


url = ipcam('http://192.168.225.88:8080/video'); % paste the same url as show in the IP Webcam app.

nnet=alexnet;

while(1)
    ss  = url.snapshot;
    picture=imresize(ss,[227,227]);
    label=classify(nnet,picture);
    image(picture);
    title(char(label));
    drawnow;
end

Machine Learning and Deep Learning with MATLAB

If you like the article, kindly share your feedback in the comments below.

Leave a Reply

Your email address will not be published.