Introduction to Artificial Intelligence (AI): A Deep Dive into Machine Learning & Deep Learning

BangBit Technologies
15 min readAug 13, 2019

--

In the last few thousands of years, human evolution has advanced through several stages in a fast forward mode. Same happened with business industries as well. The business world has seen various progressions. From several industrial revolutions to customer-focused to service-oriented to technology-driven: we have seen it all. And looking at the trend, we believe the next revolution is undoubted “Data”. Data is the new oil. In today’s era of big data, we often find ourselves with a lot of data. Data is helping enterprises transforming everything they do, and guess what, mostly driven by Artificial Intelligence (AI). Understanding the ongoing advancements in AI is overwhelming, however, it really triggered two concepts that you’ve most likely heard of before (perhaps a million times): Machine Learning and Deep Learning. As these words are always thrown around in ways that can make them seem like synonyms.

Artificial Intelligence (AI)

Before understanding Machine Learning & Deep Learning, let’s first understand AI in detail. According to the father of Artificial Intelligence, John McCarthy, it is “The science and engineering of making intelligent machines, especially intelligent computer programs.” AI is a computer program that performs something smart. It can be a complex statistical model or an if-then statement. The if-then statements are simple rules programmed by humans. Considered together, all these if-then statements are sometimes called rules engines, expert systems, knowledge graphs or symbolic AI. Such AI normally referred as Weak AI that bound to perform only certain range of tasks. Whereas Strong AI is an AI that understands itself well enough to self-improve. Artificial General Intelligence (AGI), which has cross-domain capability (like humans), can learn from a wide range of experiences (like humans).

There are several top-notch technologies that come under the umbrella of AI. As the volume of data business generates is growing at an exponential rate with ever improving computer-programming techniques/algorithms and TPU and quantum computing power, AI maturity and the potential use cases are also growing along with it. The three forces ( Data, Algorithms and Computing power) that brought AI to life is being popularly quoted as Trinity of Artificial Intelligence.

To common people AI can be referred to an automated responder (assistant) to a voice recognition system like Siri, Alexa etc or chess-playing computers or self-driving cars. But generally AI comprises advanced algorithms that follow a mathematical function, which is able to handle higher processes similar to humans. Examples include visual perception, speech recognition, decision making, translations between languages, etc.

Now let’s take a deep dive into Machine Learning & Deep Learning.

Machine Learning

Machine learning is a subset of AI. This means all machine learning considered as Artificial Intelligence, however not all AI counts as machine learning. Popular AI tools like expert systems, knowledge graphs are not falling under machine learning. Machine learning has the ability to scale itself when exposed to more volume of data unlike expert systems or knowledge graphs. One of the most important aspects of machine learning is that it doesn’t require any human intervention to make changes when required. This makes it highly efficient.

In a nutshell, machine learning can be described as the process of developing a computer system on how to make highly accurate & reliable predictions when furnished data. These predictions could be accurately recognizing speech or spotting humans or traffic signs in front of a self-driving car.

There are typically three types of machine learning: Supervised Machine Learning, Unsupervised Machine Learning, and Reinforcement Machine Learning. Before getting into the various types of machine learning and as we have already mentioned that AI comprises advanced algorithms that follow a mathematical function, let us learn some of the machine learning jargons that are commonly used.

  1. Labelled data: It consists of a set of data, an example would include all the labelled cats or dogs images in a folder or all the prices of the house based on size, etc.
  2. Classification: Separating into groups having definite values Eg. 0 or 1, cat or dog or orange etc.
  3. Regression: Estimating the most probable values or relationship among variables. Eg. estimation of the price of the house based on size.
  4. Association: Discovering interesting relations between variables in large databases where the connections that found are crucial.
  5. Clustering: Grouping related examples, particularly during unsupervised learning. Once all the examples are grouped, a human can optionally supply meaning to each cluster.
  6. Agent: In reinforcement learning, the entity that uses a policy to maximize expected return gained from transitioning between states of the environment.
  7. Model: The representation of what a machine learning system has learned from the training data.
  8. Baseline: A model used as a reference point for comparing how well another model (typically, a more complex one) is performing.
  9. Generalization: Refers to your model’s ability to make correct predictions on new, previously unseen data as opposed to the data used to train the model.
  10. Inference: Often refers to the process of making predictions by applying the trained model to unlabeled examples.
  11. Convergence: Often refers to a state reached during training in which training loss and validation loss change very little or not at all with each iteration after a certain number of iterations.
  12. Overfitting: Creating a model that matches the training data so closely that the model fails to make correct predictions on new data.
  13. Fine tuning: Perform a secondary optimization to adjust the parameters of an already trained model to fit a new problem. Fine tuning often refers to refitting the weights of a trained unsupervised model to a supervised model.
  14. Feedback loop: In machine learning, a situation in which a model’s predictions influence the training data for the same model or another model.
  15. Linear model: A model that assigns one weight per feature to make predictions. (Linear models also incorporate a bias.)
  16. Weights: A coefficient for a feature in a linear model, or an edge in a deep network. The goal of training a linear model is to determine the ideal weight for each feature. If a weight is 0, then its corresponding feature does not contribute to the model.
  17. Neural Network: A model that, taking inspiration from the brain, is composed of layers (at least one of which is hidden) consisting of simple connected units or neurons followed by nonlinearities.
  18. Layers: A set of neurons in a neural network that process a set of input features, or the output of those neurons.
  19. Neurons: A node in a neural network, typically taking in multiple input values and generating one output value. The neuron calculates the output value by applying an activation function (nonlinear transformation) to a weighted sum of input values.
  20. Backpropagation: An iterative, recursive and efficient method for calculating the weights updates to improve the network until it is able to perform the task for which it is being trained.
  21. Convolution: In mathematics, casually speaking, a mixture of two functions. In machine learning, a convolution mixes the convolutional filter and the input matrix in order to train weights.

These are just of the few terms widely used while explaining the machine learning techniques. The above terminologies can be referred to and fro while going through the rest of the topics covered for better understanding. Let us now learn the various machine learning types and algorithms used.

i) Supervised Learning

Supervised learning is task driven. You need to guide the machine to perform a certain task. Dataset act as a teacher here and its role is to train the machine. Once the machine gets properly trained, it can start making predictions or decisions whenever new data comes. Supervised Machine Learning searches for patterns within the value labels which are assigned to a dataset.

For example, multiple images of a cat, dog, orange, apple, etc. are labelled and fed into the machine for training and the machine must identify the same. Just like a human child is shown a cat and told so, when it sees a completely different cat among others still identifies it as a cat, the same method is employed here in supervised learning.

Key Points:

ii) Unsupervised Learning

Unsupervised learning is data driven. This model learns through observations and identifies structures in the data. Once the model is equipped with the dataset, it automatically identifies patterns and relationships in the dataset by creating clusters in it and it requires to describe its structure and make complex data look simple and highly organized for analysis.

For example, the images or the inputs given are grouped together in unsupervised learning and insights on the inputs can be found here (which is the most of the real world data available).

Key Points:

  • Unsupervised learning is used for Clustering problems(grouping), Anomaly Detection (in banks for unusual transactions) where there is a need for finding relationships among the data given.
  • Unlabeled data is used for training here..
  • Popular Algorithms: Apriori algorithm, k-means clustering, Association rule.
  • It is mainly used in Descriptive Modelling.

iii) Reinforcement Learning

Reinforcement Learning learns to react to an environment. They interact with the environment and find out what could be the best outcome. The machine learns from past experience and tries to capture the best possible knowledge to make accurate decisions based on the feedback received. This type of machine learning typically follows a hit & trial method. With time, the algorithm changes its strategy to learn automatically. The agent will either get rewarded or penalized for their prediction. The model trains itself with the positive rewards it gains.

Key Points:

  • Basic reinforcement is modeled as Markov Decision Process
  • The most popular algorithms used here are Q-Learning, Deep Adversarial Networks.
  • Computer playing board games such as Chess and GO, Self-driving cars are using this type of machine learning.
Summary of 3 types of Machine Learning

Before we get to know what is Deep Learning and how it is classified from Machine Learning, I really wish all of the enthusiasts like me to have an hands-on with some of the popular machine learning algorithms as explained in this blog — Commonly used Machine Learning Algorithms (with Python and R Codes) .This will give us some practical insights on machine learning techniques and algorithms for solving our business needs one day sooner.

Various Machine Learning Types and Popular Algorithms

Also, thanks to Asadulaev Arip for coming up with this 3D graph visualization of dependencies between various machine learning methods that can help us finding new ways to extend our ideas. Okay, let us back to our pondering of what is deep learning and how it classifies out from machine learning.

Deep Learning

Deep learning is a subset of machine learning. In a broader sense, it is a technique for realizing machine learning. Deep learning is the evolution of machine learning. In the case of machine learning, the systems have a measurable capacity to learn irrespective of the volume of data they acquire. But, deep learning systems can scale up their performance with access to more volume of data. In simplest terms, deep learning can excel with more data. After machines acquire more experience through deep learning, they can be put to work for specific tasks such as detecting diseases, inspecting machinery to identify faults, driving cars etc.

Deep learning algorithms are sparked by the information processing patterns observed in the human brain. Just like humans use their brain to identify patterns and classify various types of information, deep learning algorithms can be taught to perform the same tasks for machines.

To accomplish this, deep learning uses a layered structure of algorithms called an Artificial Neural Network (ANN). The design of an ANN is urged by the biological neural network of the human brain. This makes machine intelligence more proficient than standard machine learning models. It’s difficult to ensure that a deep learning model doesn’t draw inaccurate conclusions, but when it works as it’s designed to, functional deep learning is the potential backbone of true artificial intelligence.

There are several methods designed to apply deep learning. Each of the designed methods has their specific use cases depending on the type of data you have, whether it is supervised or unsupervised learning you want to use, and the task you want to solve with the data. Depending on the type of data you have and what you want to achieve, you can choose one of the deep learning methods. Few of the popular deep learning methods are Convolutional Neural Network, Recurrent Neural Network, Long short-term memory, Auto-Encoders (Denoising autoencoder, Stacked autoencoder, Variational autoencoder, Sparse autoencoder), Generative Adversarial network (or GANs for short, belong to the field of unsupervised learning is looked as one of the coolest idea in deep learning in the last 20 years).

As we again emphasizes that AI comprises several advanced algorithms that follows mathematical functions, it is necessary to look at the Mathematics of Neural Networks.

Comparative Analysis — Machine Learning & Deep Learning

Now we understood what is AI and how machine learning & deep learning work. The most important thing to learn now is how these two are different from each other. So let’s have a comparative analysis of machine learning and deep learning considering various factors.

a)Functioning

As we already told, deep learning is a subset of machine learning and takes data as an input. After feeding with data, this makes intuitive and intelligent decisions using the artificial neural network. Whereas, machine learning takes data as an input, compute it and tries to make decisions based on the training it got.

b)Extracting features from the data

Deep learning is being used to extract insightful features from the raw data. It doesn’t depend on features like local binary patterns or histogram of gradients etc. On the other hand, machine learning depends on features like local binary patterns as an input to perform. So, this is not being considered as a good option to extract insightful features from the raw data. Here data features mean pixel values, shape, textures, position, color and orientation.

c)Dependency on data

Deep learning performs well with more data, while machine learning algorithms perform well even if the dataset is small.

d)Computational power

As we mentioned above, deep learning is data dependent and process more data, they need more than just a CPU. For deep learning, you need a graphical processing unit (GPU) or TPU which have a thousand times more computational power than a CPU. On the other hand, machine learning algorithms can be performed using a CPU with specifications.

e)Training time

Deep learning network training time could be in between a few hours to months. If the dataset is large, training a network could take a lot of time. As we increase the number of layers in our network, the number of parameters known as weights will also increase, it will result in slow training. Deep learning networks even take a lot of inference time since the input test data will pass through multiple layers in the network. While traditional machine learning algorithms can be trained within a few minutes to hours.

f)Problem-solving approach

The problem-solving approach in machine learning is a bit complex as we need to divide the problem into various parts. For example, while performing object recognition, first we need to traverse through the complete image and then find if there is an object at each location and its exact location. After that from all the candidate objects, you apply a machine learning algorithm with local binary patterns as feature extractor to recognize objects. While in case of deep learning, you give the network both the bounding box coordinates & all the object’s corresponding labels, and network learns to localize and classify on its own.

g)Business reliability

Machine learning algorithms are usually simple to decode. They are interpretable about what elements they chose and why they chose, whereas, deep learning algorithms are like a black box. Even if deep learning algorithms can exceed humans in terms of performance, they are still not reliable when it comes to deploying them in the business. Machine learning algorithms like linear regression, decision trees, random forest, etc., are widely being used in businesses. E.g. banking sector uses machine learning for stock market predictions.

h)Output

Machine learning outputs are typically a numerical value like a score or a classification. On the other hand, deep learning outputs can be a score, an element, text, speech, etc.

Top Analytics/Data Science/ML Software

It’s time for to look at some of the top software, frameworks, platforms and tools to build an AI solution from data processing to data modeling and deployment.

Python, R Language, Anaconda, Tensorflow, Keras, scikit-learn, Apache Spark, SQL Language and Excel are rated among the top ML software and frameworks used, as per the recent 2019 KDnuggets poll.

Below are the top Data Science And Machine Learning Tools For Non-Programmers. This is especially advantageous to Non-IT professionals who don’t have experience with programming in Python, R, etc. These tools help us providing an end-to-end enterprise AI solutions.

  1. RapidMiner
  2. DataRobot
  3. BigML
  4. MLBase
  5. Google Cloud AutoML
  6. Auto-WEKA
  7. IBM Watson Studio
  8. Tableau
  9. Trifacta
  10. KNIME
  11. Amazon Sagemaker
  12. Microsoft AzureML

Most of the above tools are for enterprise built and commercial versions. For open source lovers, here is a blog that lists down various open source tools for Machine Learning.

As AI comprises other than Machine Learning such as Natural Language Processing, Speech Recognition System, Expert Systems, ChatBots, Predictive Analytics, Knowledge Virtualization, Robotics and more, we have various software, tools and platforms available in market for each of them. I m leaving it to the readers to explore them as per their needs.

Certainly, I agree that it’s heavy reading by now. Let us finish it off with AI practical use cases and it’s importance to today’s world.

Industry use cases

Machine learning and deep learning are broadly being used in many sectors. Let’s check a few use cases:

Healthcare: For cancer cell detection, anomaly detection, brain MRI image restoration, gene printing, etc.

Financial: Stock market prediction, financial decisions, risk management, asset/fund allocation, fraud detection, algorithmic trading.

Document: Machine learning & deep learning is being used for super-resolving historical document images, segmenting text in document images, document analysis.

Natural Language Processing: Recommendation systems (Netflix uses recommendation system to recommend movies to users based on their interest, photo tagging), Online Advertising, Virtual chatbot assistance.

Information Retrieval: Search engines, both text search, and image search (used by Google, Amazon, Facebook, Linkedin, etc.)

Computer Vision: Used for various applications like vehicle number plate identification, facial recognition, self driving cars, identifying medical issue symptoms. The heart of the AmazonGo store is computer vision.

Marketing: Used the learning technique in automated email marketing and target identification.

Retail: Virtual trial rooms, study behavioural analytics of the customers and chatbots with camera search and recommendation engine powered by visual AI technology.

Cybersecurity: Deep learning & machine learning in Cybersecurity helps companies to reduce risks and costs related to detecting various cyber attacks such as fraud, phishing, malware, malicious URLs, and malicious code detection.

Why is Artificial Intelligence important?

  • AI automates repetitive learning and discovery through data.
  • AI adds intelligence to existing products.
  • AI adapts through progressive learning algorithms to let the data do the programming.
  • AI analyzes more and deeper data using neural networks that have many hidden layers.
  • AI achieves incredible accuracy through deep neural networks — which was previously impossible.
  • AI gets the most out of data.

What’s Next?

AI Adaptive Software

Data is growing & it is growing at an exponential pace. With this much volume of data, companies of all sizes and industries are all set to leverage AI, deep learning and machine learning in the near future. Industries are deploying algorithms to maximize their top line. We have seen many start-ups developing disruptive deep learning solutions which can potentially solve varied complex business challenges. Especially deep learning is transforming many industries including healthcare, fintech, education, transportation, etc. to reimagine end-to-end business processes with digital intelligence. Deep learning architectures have offered a lot of benefits compared to other traditional AI methods. AI has great potential in terms of developing autonomous intelligent applications which can be used to forecast future demands, detecting fraud, serving customers, and also generating more revenue. The capacities are huge, that’s why we are witnessing a lot of investments and progressions in deep learning and machine learning. For a digitally transformed future, deep learning and machine learning are going to play a significant role in the years to come.

BangBit offers an entire range of AI solutions including Machine Learning, Natural Language Processing, Speech Recognition System, Expert Systems, ChatBots, Predictive Analytics, Knowledge Virtualization and more. Our offered AI solutions can be integrated seamlessly with any business model. We have core expertise in Keras, Python, OpenCV, Dailogflow, Microsoft’s LUIS, Tableau, PowerBI, etc. to integrate AI using cognitive technology across industries. Contact us today.

--

--

BangBit Technologies

Software Development | Enterprise IT Solution | Application Support | IT Consulting - Blockchain Technologies, AI Driven Solutions, AR/VR and Mobile & Web Apps.