Machine Learning UNIT I
Machine Learning UNIT I
UNIT I
What is Machine Learning
In the real world, we are surrounded by humans who can learn everything from their
experiences with their learning capability, and we have computers or machines which work on
our instructions. But can a machine also learn from experiences or past data like a human does?
So here comes the role of Machine Learning.
Machine learning algorithms create a mathematical model that, without being explicitly
programmed, aids in making predictions or decisions with the assistance of sample historical
data, or training data. For the purpose of developing predictive models, machine learning brings
together statistics and computer science. Algorithms that learn from historical data are either
constructed or utilized in machine learning. The performance will rise in proportion to the
quantity of information we provide.
A machine can learn if it can gain more data to improve its performance.
Let's say we have a complex problem in which we need to make predictions. Instead of writing
code, we just need to feed the data to generic algorithms, which build the logic based on the
data and predict the output. Our perspective on the issue has changed as a result of machine
learning. The Machine Learning algorithm's operation is depicted in the following block
diagram:
By providing them with a large amount of data and allowing them to automatically explore the
data, build models, and predict the required output, we can train machine learning algorithms.
The cost function can be used to determine the amount of data and the machine learning
algorithm's performance. We can save both time and money by using machine learning.
The significance of AI can be handily perceived by its utilization's cases, Presently, AI is
utilized in self-driving vehicles, digital misrepresentation identification, face acknowledgment,
and companion idea by Facebook, and so on. Different top organizations, for example, Netflix
and Amazon have constructed AI models that are utilizing an immense measure of information
to examine the client interest and suggest item likewise.
Following are some key points which show the importance of Machine Learning:
1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning
1) Supervised Learning
In supervised learning, sample labeled data are provided to the machine learning system for
training, and the system then predicts the output based on the training data.
The system uses labeled data to build a model that understands the datasets and learns about
each one. After the training and processing are done, we test the model with sample data to see
if it can accurately predict the output.
The mapping of the input data to the output data is the objective of supervised learning. The
managed learning depends on oversight, and it is equivalent to when an understudy learns
things in the management of the educator. Spam filtering is an example of supervised learning.
o Classification
o Regression
2) Unsupervised Learning
Unsupervised learning is a learning method in which a machine learns without any supervision.
The training is provided to the machine with the set of data that has not been labeled, classified,
or categorized, and the algorithm needs to act on that data without any supervision. The goal
of unsupervised learning is to restructure the input data into new features or a group of objects
with similar patterns.
In unsupervised learning, we don't have a predetermined result. The machine tries to find useful
insights from the huge amount of data. It can be further classifieds into two categories of
algorithms:
o Clustering
o Association
3) Reinforcement Learning
The robotic dog, which automatically learns the movement of his arms, is an example of
Reinforcement learning.
o 1834: In 1834, Charles Babbage, the father of the computer, conceived a device that
could be programmed with punch cards. However, the machine was never built, but all
modern computers rely on its logical structure.
o 1936: In 1936, Alan Turing gave a theory that how a machine can determine and
execute a set of instructions.
o 1940: In 1940, the first manually operated computer, "ENIAC" was invented, which
was the first electronic general-purpose computer. After that stored program computer
such as EDSAC in 1949 and EDVAC in 1951 were invented.
o 1943: In 1943, a human neural network was modeled with an electrical circuit. In 1950,
the scientists started applying their idea to work and analyzed how human neurons
might work.
o 1952: Arthur Samuel, who was the pioneer of machine learning, created a program that
helped an IBM computer to play a checkers game. It performed better more it played.
o 1959: In 1959, the term "Machine Learning" was first coined by Arthur Samuel.
o The duration of 1974 to 1980 was the tough time for AI and ML researchers, and this
duration was called as AI winter.
o In this duration, failure of machine translation occurred, and people had reduced their
interest from AI, which led to reduced funding by the government to the researches.
o 1959: In 1959, the first neural network was applied to a real-world problem to remove
echoes over phone lines using an adaptive filter.
o 1985: In 1985, Terry Sejnowski and Charles Rosenberg invented a neural
network NETtalk, which was able to teach itself how to correctly pronounce 20,000
words in one week.
o 1997: The IBM's Deep blue intelligent computer won the chess game against the chess
expert Garry Kasparov, and it became the first computer which had beaten a human
chess expert.
2006:
o Geoffrey Hinton and his group presented the idea of profound getting the hang of
utilizing profound conviction organizations.
o The Elastic Compute Cloud (EC2) was launched by Amazon to provide scalable
computing resources that made it easier to create and implement machine learning
models.
2007:
o Participants were tasked with increasing the accuracy of Netflix's recommendation
algorithm when the Netflix Prize competition began.
o Support learning made critical progress when a group of specialists utilized it to prepare
a PC to play backgammon at a top-notch level.
2008:
o Google delivered the Google Forecast Programming interface, a cloud-based help that
permitted designers to integrate AI into their applications.
o Confined Boltzmann Machines (RBMs), a kind of generative brain organization,
acquired consideration for their capacity to demonstrate complex information
conveyances.
2009:
o Profound learning gained ground as analysts showed its viability in different errands,
including discourse acknowledgment and picture grouping.
o The expression "Large Information" acquired ubiquity, featuring the difficulties and
open doors related with taking care of huge datasets.
2010:
2011:
2012:
2014:
2015:
2016:
o The goal of explainable AI, which focuses on making machine learning models easier
to understand, received some attention.
o Google's DeepMind created AlphaGo Zero, which accomplished godlike Go abilities
to play without human information, utilizing just support learning.
2017:
Based on the methods and way of learning, machine learning is divided into mainly four types,
which are:
In this topic, we will provide a detailed description of the types of Machine Learning along
with their respective algorithms:
o Classification
o Regression
Advantages:
o Since supervised learning work with the labelled dataset so we can have an exact idea
about the classes of objects.
o These algorithms are helpful in predicting the output on the basis of prior experience.
Disadvantages:
o Image Segmentation:
Supervised Learning algorithms are used in image segmentation. In this process, image
classification is performed on different image data with pre-defined labels.
o Medical Diagnosis:
Supervised algorithms are also used in the medical field for diagnosis purposes. It is
done by using medical images and past labelled data with labels for disease conditions.
With such a process, the machine can identify a disease for the new patients.
o Fraud Detection - Supervised Learning classification algorithms are used for
identifying fraud transactions, fraud customers, etc. It is done by using historic data to
identify the patterns that can lead to possible fraud.
o Spam detection - In spam detection & filtering, classification algorithms are used.
These algorithms classify an email as spam or not spam. The spam emails are sent to
the spam folder.
o Speech Recognition - Supervised learning algorithms are also used in speech
recognition. The algorithm is trained with voice data, and various identifications can be
done using the same, such as voice-activated passwords, voice commands, etc.
Unsupervised learning is different from the Supervised learning technique; as its name
suggests, there is no need for supervision. It means, in unsupervised machine learning, the
machine is trained using the unlabeled dataset, and the machine predicts the output without any
supervision.
In unsupervised learning, the models are trained with the data that is neither classified nor
labelled, and the model acts on that data without any supervision.
Unsupervised Learning can be further classified into two types, which are given below:
o Clustering
o Association
Advantages:
o These algorithms can be used for complicated tasks compared to the supervised ones
because these algorithms work on the unlabeled dataset.
o Unsupervised algorithms are preferable for various tasks as getting the unlabeled
dataset is easier as compared to the labelled dataset.
Disadvantages:
o The output of an unsupervised algorithm can be less accurate as the dataset is not
labelled, and algorithms are not trained with the exact output in prior.
o Working with Unsupervised learning is more difficult as it works with the unlabelled
dataset that does not map with the output.
3. Semi-Supervised Learning
Although Semi-supervised learning is the middle ground between supervised and unsupervised
learning and operates on the data that consists of a few labels, it mostly consists of unlabeled
data. As labels are costly, but for corporate purposes, they may have few labels. It is completely
different from supervised and unsupervised learning as they are based on the presence &
absence of labels.
We can imagine these algorithms with an example. Supervised learning is where a student is
under the supervision of an instructor at home and college. Further, if that student is self-
analysing the same concept without any help from the instructor, it comes under unsupervised
learning. Under semi-supervised learning, the student has to revise himself after analyzing the
same concept under the guidance of an instructor at college.
Advantages:
4. Reinforcement Learning
In reinforcement learning, there is no labelled data like supervised learning, and agents learn
from their experiences only.
The reinforcement learning process is similar to a human being; for example, a child learns
various things by experiences in his day-to-day life. An example of reinforcement learning is
to play a game, where the Game is the environment, moves of an agent at each step define
states, and the goal of the agent is to get a high score. Agent receives feedback in terms of
punishment and rewards.
Due to its way of working, reinforcement learning is employed in different fields such as Game
theory, Operation Research, Information theory, multi-agent systems.
Advantages
Disadvantage
The curse of dimensionality limits reinforcement learning for real physical systems.
GOALS OF MACHINE LEARNING
The goals of machine learning include:
The life of Machine Learning programs is straightforward and can be summarized in the
following points: (2 marks)
1. Define a question
2. Collect data
3. Visualize data
4. Train algorithm
5. Test the Algorithm
6. Collect feedback
7. Refine the algorithm
8. Loop 4-7 until the results are satisfying
9. Use the model to make a prediction
Once the algorithm gets good at drawing the right conclusions, it applies that knowledge to
new sets of data.
**(16 marks)
Machine learning life cycle
Machine learning life cycle is a cyclic process to build an efficient machine learning project.
The main purpose of the life cycle is to find a solution to the problem or project.
Machine learning life cycle involves seven major steps, which are given below:
o Gathering Data
o Data preparation
o Data Wrangling
o Analyse Data
o Train the model
o Test the model
o Deployment
1. Gathering Data:
Data Gathering is the first step of the machine learning life cycle. The goal of this step is to
identify and obtain all data-related problems.
In this step, we need to identify the different data sources, as data can be collected from various
sources such as files, database, internet, or mobile devices. It is one of the most important steps
of the life cycle. The quantity and quality of the collected data will determine the efficiency of
the output. The more will be the data, the more accurate will be the prediction.
2. Data preparation
After collecting the data, we need to prepare it for further steps. Data preparation is a step
where we put our data into a suitable place and prepare it to use in our machine learning
training.
In this step, first, we put all data together, and then randomize the ordering of data.
This step can be further divided into two processes:
Data exploration:
It is used to understand the nature of data that we have to work with. We need to understand
the characteristics, format, and quality of data. A better understanding of data leads to an
effective outcome. In this, we find Correlations, general trends, and outliers.
Data pre-processing: Now the next step is preprocessing of data for its analysis.
3. Data Wrangling
Data wrangling is the process of cleaning and converting raw data into a useable format. It is
the process of cleaning the data, selecting the variable to use, and transforming the data in a
proper format to make it more suitable for analysis in the next step. It is one of the most
important steps of the complete process. Cleaning of data is required to address the quality
issues.
It is not necessary that data we have collected is always of our use as some of the data may not
be useful. In real-world applications, collected data may have various issues, including:
o Missing Values
o Duplicate data
o Invalid data
o Noise
So, we use various filtering techniques to clean the data.
It is mandatory to detect and remove the above issues because it can negatively affect the
quality of the outcome.
4. Data Analysis
Now the cleaned and prepared data is passed on to the analysis step. This step involves:
o Selection of analytical techniques
o Building models
o Review the result
The aim of this step is to build a machine learning model to analyze the data using various
analytical techniques and review the outcome. It starts with the determination of the type of the
problems, where we select the machine learning techniques such as Classification, Regression,
Cluster analysis, Association, etc. then build the model using prepared data, and evaluate the
model.
Hence, in this step, we take the data and use machine learning algorithms to build the model.
5. Train Model
Now the next step is to train the model, in this step we train our model to improve its
performance for better outcome of the problem.
We use datasets to train the model using various machine learning algorithms. Training a model
is required so that it can understand the various patterns, rules, and, features.
6. Test Model
Once our machine learning model has been trained on a given dataset, then we test the model.
In this step, we check for the accuracy of our model by providing a test dataset to it.
Testing the model determines the percentage accuracy of the model as per the requirement of
project or problem.
7. Deployment
The last step of machine learning life cycle is deployment, where we deploy the model in the
real-world system.
If the above-prepared model is producing an accurate result as per our requirement with
acceptable speed, then we deploy the model in the real system. But before deploying the
project, we will check whether it is improving its performance using available data or not. The
deployment phase is similar to making the final report for a project.
However, gathering data is not the only concern. We also need to model and process the data
to suit the algorithms that we’ll be using. Data security is also one of the frequently faced issues
in machine learning. Once a company has dugged up the data, security is a very prominent
aspect that needs to be taken care of. Differentiating between sensitive and insensitive data is
essential to implementing machine learning correctly and efficiently.
Companies need to store sensitive data by encrypting such data and storing it in other servers
or a place where the data is fully secured. Less confidential data can be made accessible to
trusted team members.
2. Infrastructure Requirements for Testing & Experimentation
Most companies that are facing machine learning challenges have something in common
among themselves. They lack the proper infrastructure which is essential for data modeling and
reusability. Proper infrastructure aids the testing of different tools. Frequent tests should also
be allowed to develop the best possible and desired outcomes, which in turn, assist in creating
better, stout, and manageable results.
Companies that lack the infrastructure requirements can consult with different firms to model
their data groups aptly. Then, they can compare the results with a different perspective and the
best one can be adopted accordingly by the company and subsequently, by the board.
The stratification method is usually used to test machine learning algorithms. In this method,
we draw a random sample from the dataset which is a representation of the true population.
The common practice is to divide the dataset in a stratified fashion. Stratification simply means
that we randomly split the dataset so that each class is correctly represented in the resulting
subsets — the training and the test set.
If one of the machine learning strategies doesn’t work, it enables the company to learn what is
required and consequently guides them in building a new and robust machine learning design.
The willingness to adapt to failures and learn from them greatly increases the company’s
chances of successful machine learning adoption.
4. Lack of Talent
This is the most worrying challenge faced by businesses in machine learning adoption. While
the number of machine learning enthusiasts has increased in the market, it’ll still take a while
for the same numbers to reflect on the number of machine learning experts.
With artificial intelligence and machine learning being relatively younger technologies in the
IT industry, the talent pool required to fully understand and implement complex machine
learning algorithms is limited. And if we don’t have the right people to implement it, then it is
difficult to unlock the true potential of machine learning applications.
Organizations are gradually realizing the avenues machine learning can open up for them. As
a result, the demand for experienced data scientists has skyrocketed. And so have the salaries
in this space. Job sites list data scientists as one of the highest paying jobs of 2020. With more
and more organizations getting on board with big data, AI and ML, this demand is only going
to increase in the coming years.
One path companies are taking to overcome this challenge is collaboration. Organizations are
partnering up with companies that have the skillset and the experience to harness the power of
machine learning and implement the offerings to suit our organization’s business goals.
5. Time-Consuming Implementation
Patience goes a long way in ensuring that our efforts bear fruits. And this cannot be truer for
machine learning. One of the most common machine learning challenges is impatience.
Businesses that implement machine learning usually expect it to magically solve all their
problems and start bringing in profits from the get-go.
It involves a lot of intricate planning and detailed execution. And yet, due to multiple layers
and the usual uncertainties regarding the behavior of the algorithms, it is not guaranteed that
the time estimated by our team for machine learning project completion will be accurate.
Therefore, it is very important to have patience and an experimental approach while working
on machine learning projects. To achieve desirable results on adoption machine learning, we
should give our project and our team plenty of time.
6. Affordability
If we’re looking to adopt machine learning, we will require Data Engineers, a Project Manager
with a sound technical background. In essence, a full data science team isn’t something newer
companies or start-ups can afford.
As a result, employing a machine learning method can be extremely tedious, but can also serve
as a revenue charger for a company. However, this is only possible by implementing machine
learning in newer and more innovative ways. Adopting machine learning is only beneficial if
there are different plans, so regardless of one plan not performing up to the desired standards,
the other can be put into action. Getting a glimpse into which machine learning algorithm
would suit an organization is the only issue that one needs to get by. Once we get the best
algorithm with which we’re achieving the required outcomes, we shouldn’t stop experimenting
and trying to find better and more innovative algorithms.
Budgeting as per different milestones in the journey works out well to suit the affordability of
the organization. If we are not confident on the talent required to implement a full-fledged
machine learning algorithm, we can always go for a consultation with companies that have the
expertise and experience in machine learning projects.
Maruti Techlabs, help reap the benefits of machine learning in line with their business goals.
The machine learning experts have worked with organizations worldwide to provide machine
learning solutions that enable rapid decision making, increased productivity, and business
process automation.
Business Benefits of ML
Top 6 Business Benefits of Machine Learning
Conversational interfaces, such as chatbots, are among the first examples of automation since
they allow for human-machine interaction by letting users ask questions and receive responses.
In the early days of chatbots, the bots were programmed to do certain behaviours based on
predefined rules.
Chatbots are getting better at anticipating and responding to their users' demands and speaking
more like people. With the addition of AI's machine learning and natural language processing
(NLP), chatbots have the potential to be more engaging and productive. Machine learning
algorithms underpin digital assistants like Siri, Google Assistant, and Amazon's Alexa, and this
technology might be used to replace traditional chatbots in new customer care and engagement
platforms.
Chatbots are among the most popular machine learning applications in the workplace. The
following are a few instances of chatbots that have received praise:
Touted as a "quick, simple answer" machine by IBM, Watson Assistant has been designed
to determine when further information is needed and when the request should be escalated
to a person.
Listen, search, and share music with the music streaming service's bot for Facebook
Messenger.
A rider's license plate and car model are supplied to them via chat platforms or phone calls
so they can locate their transport.
Machine learning (ML) in the healthcare business makes it feasible to identify high-risk
patients, diagnose them, prescribe optimal medications, and forecast readmissions. Data from
anonymised patient records and symptoms are the primary sources of these findings. Patient
recovery can be accelerated without unnecessary drugs. ML allows the medical industry to
enhance patient health.
Automated data entry jobs can be performed by computers, freeing up human resources to
focus on higher-value work. Data entry automation raises several challenges, the most
significant of which are data duplication and accuracy. Predictive modeling and machine
learning methods can significantly improve this issue.
Companies may use predictive inventory planning and consumer segmentation capabilities
provided by machine learning software to help establish pricing and deliver the appropriate
items and services to the right places at the right time. Adnan Masood, the chief architect of
UST Global and an expert in artificial intelligence and machine learning, explains that retailers
use machine learning to anticipate what merchandise would sell best in their locations based
on seasonal considerations, demographics of that region, and other data points.
Customers' buying habits can be analysed using machine learning applications, which allow
retailers to better serve their customers by stocking their stores with products that are more
likely to be purchased by those customers, such as those who are similar in terms of age,
income, or educational attainment, for example.
6. Fraud detection
When it comes to identifying fraud, machine learning is a powerful tool because of its ability
to recognize patterns and quickly identify abnormalities. Financial firms have been utilizing
machine learning in this field for years.
Here's how it goes down: An individual customer's normal behaviour, such as when and where
they use a credit card, may be learned using machine learning. It is possible for machine
learning to use this and other data sets to quickly distinguish between transactions that fit within
anticipated norms and those that may be fraudulent by analysing the data in milliseconds.
Machine learning may be used to detect fraud in a variety of businesses, including:
The Provision of Monetary Services
Travel
Gaming
Retail
Conclusion
Automation and artificial intelligence (AI) are becoming more essential tools for businesses
in their day-to-day operations, and machine learning is one of the most widely used.
To run a successful business, we must make decisions based on facts. If we don't keep up with
industry-related terms like "machine learning," we can miss out on new analytical tools that
might help we make better decisions.
Machine learning is a subset of the field known as artificial intelligence (AI). Machine learning
techniques help firms make the most of these significant changes to understand their data.
Although the installation of ML can be time-consuming and expensive, AI development
companies are willing to take on this challenge since it gives natural and significant advantages
over any other analytical tool.
Automation:
Machine learning, which works entirely autonomously in any field without the need for
any human intervention. For example, robots performing the essential process steps in
manufacturing plants.
Finance Industry
Machine learning is growing in popularity in the finance industry. Banks are mainly
using ML to find patterns inside the data but also to prevent fraud.
Government organization
The government makes use of ML to manage public safety and utilities. Take the
example of China with the massive face recognition. The government uses Artificial
intelligence to prevent jaywalker.
Healthcare industry
Healthcare was one of the first industry to use machine learning with image detection.
Marketing
Broad use of AI is done in marketing thanks to abundant access to data. Before the age
of mass data, researchers develop advanced mathematical tools like Bayesian analysis
to estimate the value of a customer. With the boom of data, marketing department relies
on AI to optimize the customer relationship and marketing campaign.
Machine learning gives terrific results for visual pattern recognition, opening up many potential
applications in physical inspection and maintenance across the entire supply chain network.
Unsupervised learning can quickly search for comparable patterns in the diverse dataset. In
turn, the machine can perform quality inspection throughout the logistics hub, shipment with
damage and wear.
For instance, IBM’s Watson platform can determine shipping container damage. Watson
combines visual and systems-based data to track report and make recommendations in real-
time.
In past year stock manager relies extensively on the primary method to evaluate and forecast
the inventory. When combining big data and machine learning, better forecasting techniques
have been implemented (an improvement of 20 to 30 % over traditional forecasting tools). In
term of sales, it means an increase of 2 to 3 % due to the potential reduction in inventory costs.
Demysifying AI & ML
Demystifying AI is a series of posts that (try to) disambiguate the jargon and myths surrounding
artificial intelligence.
The subject of artificial intelligence is humungous similar to the massive milky way galaxy.
Artificial Intelligence (AI) is a broad field with many sub-categories such as natural language
processing (NLP), artificial neural networks, computer vision, machine learning, deep learning,
robotics, so on and so forth. The formal definition of AI is —
“The theory and development of computer systems able to perform tasks normally requiring
human intelligence, such as visual perception, speech recognition, decision-making, and
translation between languages.”
However, even before we start diving deeper into these other fields, Artificial intelligence can
be narrowed down to two separate broader fields as follows:
Artificial Narrow Intelligence — Perform one or a few particular tasks that they are
programmed to do. Examples of these are self-driving cars, next word predictions, autocorrect,
etc. This is the main concept that we will be focusing on.
Artificial General Intelligence — These perform human-like activities and tasks. General AI is
a type of intelligence that could perform any intellectual task with efficiency like a human.
There are still a lot of progressions to be made in this field.
There is also another term called super AI or strong AI intelligence which is the AI that is
believed to surpass humans. However, it is only a hypothetical concept and will not be
discussed in this article as we are still far away from reaching this level of intelligence in the
upcoming years.
To understand the concepts of AI and the various aspects surrounding it, I have developed a
simple analogy of the universe with respect to the universe.
The humongous Milky Way galaxy is similar to the broad field of AI. It contains billions of
solar systems similar to how AI consists of so many sub-fields. Our solar system is similar to
one of the sub-fields in AI which is “machine learning”. The earth which is the only habitable
planet in our solar system can be referred to as “deep learning”.
With our analogy, we can conclude that artificial intelligence is similar to the vast milky way
galaxy which is a broad field consisting of sub-topics such as machine learning which can be
compared to our solar system, and deep learning which is a sub-topic of machine learning is
similar to the earth in the solar system. Below is a simple reference to understand this analogy
better.
AI = Milky Way Galaxy | ML = Solar System | DL = Earth
The goal of AI is to make a smart The goal of ML is to allow machines to learn from
computer system like humans to solve data so that they can give accurate output.
complex problems.
In AI, we make intelligent systems to In ML, we teach machines with data to perform a
perform any task like a human. particular task and give an accurate result.
Machine learning and deep learning are Deep learning is a main subset of machine
the two main subsets of AI. learning.
AI has a very wide range of scope. Machine learning has a limited scope.
The main applications of AI are Siri, The main applications of machine learning
customer support using catboats, are Online recommender system, Google
Expert System, Online game playing, search algorithms, Facebook auto friend
intelligent humanoid robot, etc. tagging suggestions, etc.
On the basis of capabilities, AI can be Machine learning can also be divided into mainly
divided into three types, which three types that are Supervised
are, Weak AI, General AI, learning, Unsupervised learning,
and Strong AI. and Reinforcement learning.
AI completely deals with Structured, Machine learning deals with Structured and semi-
semi-structured, and unstructured data. structured data.
What is artificial intelligence (AI)?
Artificial intelligence is the capability of a computer system to mimic human cognitive
functions such as learning and problem-solving. Through AI, a computer system uses
mathematics and logic to simulate the reasoning that people use to learn from new information
and make decisions.
Are AI and machine learning the same?
While AI and machine learning are very closely connected, they are not the same. Machine
learning is considered a subset of AI.
What is Machine Learning?
Machine learning is an application of AI. It’s the process of using mathematical models of data
to help a computer learn without direct instruction. This enables a computer system to continue
learning and improving on its own, based on experience.
How are AI and machine learning connected?
An “intelligent” computer uses AI to think like a human and perform tasks on its own. Machine
learning is how a computer system develops its intelligence.
One way to train a computer to mimic human reasoning is to use a neural network, which is a
series of algorithms that are modeled after the human brain. The neural network helps the
computer system achieve AI through deep learning. This close connection is why the idea of
AI vs. machine learning is really about the ways that AI and machine learning work together.
Structure of an
AI Agent
To understand the structure of Intelligent Agents, we should be familiar
with Architecture and Agent programs. Architecture is the machinery that the agent
executes on. It is a device with sensors and actuators, for example, a robotic car, a camera,
and a PC. An agent program is an implementation of an agent function. An agent
function is a map from the percept sequence(history of all that an agent has perceived to
date) to an action.
Simple reflex agents ignore the rest of the percept history and act only on the basis of
the current percept. Percept history is the history of all that an agent has perceived to date.
The agent function is based on the condition-action rule. A condition-action rule is a rule
that maps a state i.e., a condition to an action. If the condition is true, then the action is taken,
else not. This agent function only succeeds when the environment is fully observable. For
simple reflex agents operating in partially observable environments, infinite loops are often
unavoidable. It may be possible to escape from infinite loops if the agent can randomize its
actions.
Problems with Simple reflex agents are :
Very limited intelligence.
No knowledge of non-perceptual parts of the state.
Usually too big to generate and store.
If there occurs any change in the environment, then the collection of rules needs
to be updated.
It works by finding a rule whose condition matches the current situation. A model-based
agent can handle partially observable environments by the use of a model about the world.
The agent has to keep track of the internal state which is adjusted by each percept and that
depends on the percept history. The current state is stored inside the agent which maintains
some kind of structure describing the part of the world which cannot be seen.
Updating the state requires information about:
How the world evolves independently from the agent?
How do the agent’s actions affect the world?
Goal-Based Agents
These kinds of agents take decisions based on how far they are currently from
their goal(description of desirable situations). Their every action is intended to reduce their
distance from the goal. This allows the agent a way to choose among multiple possibilities,
selecting the one which reaches a goal state. The knowledge that supports its decisions is
represented explicitly and can be modified, which makes these agents more flexible. They
usually require search and planning. The goal-based agent’s behavior can easily be changed.
Goal-Based Agents
Utility-Based Agents
The agents which are developed having their end uses as building blocks are called utility-
based agents. When there are multiple possible alternatives, then to decide which one is best,
utility-based agents are used. They choose actions based on a preference (utility) for each
state. Sometimes achieving the desired goal is not enough. We may look for a quicker, safer,
cheaper trip to reach a destination. Agent happiness should be taken into consideration.
Utility describes how “happy” the agent is. Because of the uncertainty in the world, a utility
agent chooses the action that maximizes the expected utility. A utility function maps a state
onto a real number which describes the associated degree of happiness.
Utility-Based Agents
Learning Agent
A learning agent in AI is the type of agent that can learn from its past experiences or it has
learning capabilities. It starts to act with basic knowledge and then is able to act and adapt
automatically through learning. A learning agent has mainly four conceptual components,
which are:
1. Learning element: It is responsible for making improvements by learning from
the environment.
2. Critic: The learning element takes feedback from critics which describes how
well the agent is doing with respect to a fixed performance standard.
3. Performance element: It is responsible for selecting external action.
4. Problem Generator: This component is responsible for suggesting actions that
will lead to new and informative experiences.
Learning Agent
Multi-Agent Systems
These agents interact with other agents to achieve a common goal. They may have to
coordinate their actions and communicate with each other to achieve their objective.
A multi-agent system (MAS) is a system composed of multiple interacting agents that are
designed to work together to achieve a common goal. These agents may be autonomous or
semi-autonomous and are capable of perceiving their environment, making decisions, and
taking action to achieve the common objective.
MAS can be used in a variety of applications, including transportation systems, robotics, and
social networks. They can help improve efficiency, reduce costs, and increase flexibility in
complex systems. MAS can be classified into different types based on their characteristics,
such as whether the agents have the same or different goals, whether the agents are
cooperative or competitive, and whether the agents are homogeneous or heterogeneous.
In a homogeneous MAS, all the agents have the same capabilities, goals, and
behaviors.
In contrast, in a heterogeneous MAS, the agents have different capabilities, goals,
and behaviors.
This can make coordination more challenging but can also lead to more flexible and robust
systems.
Cooperative MAS involves agents working together to achieve a common goal, while
competitive MAS involves agents working against each other to achieve their own goals. In
some cases, MAS can also involve both cooperative and competitive behavior, where agents
must balance their own interests with the interests of the group.
MAS can be implemented using different techniques, such as game theory, machine learning,
and agent-based modeling. Game theory is used to analyze strategic interactions between
agents and predict their behavior. Machine learning is used to train agents to improve their
decision-making capabilities over time. Agent-based modeling is used to simulate complex
systems and study the interactions between agents.
Overall, multi-agent systems are a powerful tool in artificial intelligence that can help solve
complex problems and improve efficiency in a variety of applications.
Hierarchical Agents
These agents are organized into a hierarchy, with high-level agents overseeing the behavior
of lower-level agents. The high-level agents provide goals and constraints, while the low-
level agents carry out specific tasks. Hierarchical agents are useful in complex environments
with many tasks and sub-tasks.
Hierarchical agents are agents that are organized into a hierarchy, with high-level
agents overseeing the behavior of lower-level agents. The high-level agents
provide goals and constraints, while the low-level agents carry out specific tasks.
This structure allows for more efficient and organized decision-making in
complex environments.
Hierarchical agents can be implemented in a variety of applications, including
robotics, manufacturing, and transportation systems. They are particularly useful
in environments where there are many tasks and sub-tasks that need to be
coordinated and prioritized.
In a hierarchical agent system, the high-level agents are responsible for setting
goals and constraints for the lower-level agents. These goals and constraints are
typically based on the overall objective of the system. For example, in a
manufacturing system, the high-level agents might set production targets for the
lower-level agents based on customer demand.
The low-level agents are responsible for carrying out specific tasks to achieve the
goals set by the high-level agents. These tasks may be relatively simple or more
complex, depending on the specific application. For example, in a transportation
system, low-level agents might be responsible for managing traffic flow at
specific intersections.
Hierarchical agents can be organized into different levels, depending on the
complexity of the system. In a simple system, there may be only two levels: high-
level agents and low-level agents. In a more complex system, there may be
multiple levels, with intermediate-level agents responsible for coordinating the
activities of lower-level agents.
One advantage of hierarchical agents is that they allow for more efficient use of
resources. By organizing agents into a hierarchy, it is possible to allocate tasks to
the agents that are best suited to carry them out, while avoiding duplication of
effort. This can lead to faster, more efficient decision-making and better overall
performance of the system.
Overall, hierarchical agents are a powerful tool in artificial intelligence that can help solve
complex problems and improve efficiency in a variety of applications.
Uses of Agents
Agents are used in a wide range of applications in artificial intelligence, including:
Robotics: Agents can be used to control robots and automate tasks in
manufacturing, transportation, and other industries.
Smart homes and buildings: Agents can be used to control heating, lighting, and
other systems in smart homes and buildings, optimizing energy use and improving
comfort.
Transportation systems: Agents can be used to manage traffic flow, optimize
routes for autonomous vehicles, and improve logistics and supply chain
management.
Healthcare: Agents can be used to monitor patients, provide personalized
treatment plans, and optimize healthcare resource allocation.
Finance: Agents can be used for automated trading, fraud detection, and risk
management in the financial industry.
Games: Agents can be used to create intelligent opponents in games and
simulations, providing a more challenging and realistic experience for players.
Natural language processing: Agents can be used for language translation,
question answering, and chatbots that can communicate with users in natural
language.
Cybersecurity: Agents can be used for intrusion detection, malware analysis, and
network security.
Environmental monitoring: Agents can be used to monitor and manage natural
resources, track climate change, and improve environmental sustainability.
Social media: Agents can be used to analyze social media data, identify trends
and patterns, and provide personalized recommendations to users.
AI with ML is impacting a lot of industries by collecting a lot of data and giving some
information that can be used in the further decision-making process. Below are some reasons
why AI and ML hold the future of the industries.
AI/Ml are driving an era of automation that holds important benefits for global
industries like increased productivity.
AI/ML brings in speed, as companies have started relying on technologies to
optimize their internal business operations.
AI/ML boosts creativity and innovation by automating tasks so that employees
only focus on the essential part.
AI/ML also can handle and analyze enormous data in an unbiased manner.
Industries That are Impacting by AI and ML
1. Retail
Retail has been augmented hugely by AI/ML as it has become hugely dependent on them. It
has made it possible for the companies to determine the need and the demand for the product
before the product is released so that they can avoid potential risks and losses which may
occur after the release of the product. Using these techniques companies can also roughly
predict the performance of their product before it is launched.
The involvement of AI/ML techniques in the retail sector has not only allowed companies to
save money but also earn huge profits by customizing the search results and
recommendations for each user based on the previously searched and purchased items. These
techniques also give the user the ability to filter the searches based on categories such as
money and popularity of a product. Such filtering techniques are based on a variety of
parameters.
2. Finance
AI/ML offers accurate solutions for shared datasets that increase the efficiency and safety of
the financial system. AI/ML also plays a significant role in financial advisory services as
they are considered unparalleled in the field of decision making.
It also advises people regarding the stocks they need to buy, hold and sell as AI/ML can
observe patterns in past data and predict how the patterns will repeat themselves in the future.
AI/ML also helps a person to manage their expenses by accumulating all the data from the
web footprint and creating a spending graph. This system helps a person to manage personal
finances quickly and easily.
3. Healthcare
AI/ML ensures proper healthcare is provided to every individual and there are no issues
prevalent in managing the patients and their data. AI/ML has a lot of scope in medical science
as it helps to improve diagnostic methods and also helps in detecting the diseases quite
accurately which sometimes may be overlooked by doctors. AI/ML has many benefits in
healthcare that can assist doctors in many possible areas.
For example, AI/ML can aid doctors to detect if a person is suffering from particular disease,
what are the affected areas and what is the degree of severity of disease; leaving doctors to
focus on the main part of the problem and saving them a lot of time which gives them more
time in hand to treat other patients. This process saves a lot of money and time of the patient
and allows them to receive the treatment quickly. AI/ML also helps to eliminate errors that
may occur during diagnosis and some super-advanced versions of AI/ML may also suggest
treatment levels for curing a patient.
AI/ML also allows companies to make their content more accessible to customers as
customers have become more powerful than ever before due to rapid digitization. Digital
media is not just an additional distribution platform but has emerged as a core revenue
generator. Truthfully if an industry wishes to sustain and grow they have to face severe
competition that exists in digital marketing.
AI/ML looks into users’ information, social media behavior, and usage pattern with help of
predictive analytics for better segmentation and targeting. This predictive analysis also
facilitates right viewing content, based on audience preferences and identifies the best content
with the maximum earning potential. Also using trigger-based live events like KBC and
cricket matches aids in capturing and engaging customers for entertainment and marketing
purposes.
5. Transportation
AI/ML has also been continuously aiming to reduce costs and generate more sales by
delivering products with a much shorter lead time. Transportation companies use AI/ML
techniques to detect real-time traffic detection and aid in optimizing routes thus providing
faster traffic navigation. This proves to be profitable for both customers and companies. Auto
prediction of the path of cyclists and pedestrians also aids in reducing injuries and traffic
accidents. Gaging traffic information also allows a significant reduction in emission levels.
AI/ML has also given the new buzz in the transportation sector by introducing self-driving
cars that help in reducing car accidents on highways.
Below you will find in detail description about the security attacks and the solutions provided
by both Machine Learning and Artificial Intelligence.
1. Social Engineering
In such types of attacks, a person pretends to be someone else in order to trick users into
disclosing confidential data, information or both. In order to prevent any kind of unauthorized
access gain to confidential information, a cloud-based stack can protect against highly
targeted script-based attacks including malware. ML and AI enhance the capabilities of this
cloud network by supporting real-time blocking of new and unknown threats.
2. Phishing
It is one of the most common types of attacks aimed at stealing the victim’s personal
information like banking account details. Attackers usually use spoofed emails that contain
links directing the user to a malware-infected site. Such sites replicate genuine sites and trick
the user into entering confidential details like passwords. AI and ML co-ordinate very well
with each other in order to identify potential anomalies in emails. By analyzing the metadata,
content, context of emails the system makes suitable decisions on how to tackle the malicious
email. Using words like urgent and promotion in an email are picked by the AI systems as
suspicious but the final decision is made after analyzing the email as a whole based on the
following parameters. Whether there was a previous conversation, a connection between the
subject and the content of the email, along with misspelled domains if any. ML-based
protection continuously learns from such scenarios along with feedback data given to it by
the user making the protection more accurate day by day.
3. Spear Phishing
It is a type of phishing but done in a more planned way by the attacker. The attacker first
tends to do a background check on the user and then according to the users’ most common
interests, most common visited websites and social media feeds the user is analyzed and is
sent so-called credible mails which ultimately lead the target to open up little by little.
Ultimately the user ends up downloading the malicious file. However, ML and AI make
consistent efforts to tackle such kind of attacks. AI is used to understand the communication
patterns which take place and if the system identifies an attack the ML-powered AI system
block it before they cause any damage.
4. Watering Hole
Such attacks are based on the principle that a hunter uses for the prey to fall into the trap. In
such attacks, the attacker tends to exploit the vulnerabilities of a website that is visited again
and again by the user. ML and AI her us the path traversal algorithms for detecting any kind
of malicious data. These traversal algorithms analyze if a user is directed to any kind of
malicious website. For plotting such kind if attacks a lot of data from email traffic, proxy and
pocket are required which is thoroughly scanned by the ml systems.
5. Network Sniffing
It is the process of capturing and analyzing the data packets that travel across the network.
The network sniffer monitors all the data with the use of clear and readable messages being
transmitted over a network. The best countermeasure to prevent sniffing is the use of
encrypted communication between the hosts. VPNs are particularly used for encrypting the
data. ML and AI-powered VPNs have however taken the protection to another level. ML-
powered VPNs are equipped with a sophisticated learning algorithm that creates a private
tunnel in the open networks like WiFi encapsulating and encrypting all the data sent on the
network. This is done to prevent an attacker from deciphering the contents even if the data
packets have been intercepted