0% found this document useful (0 votes)
2 views120 pages

Unit-1 ML

The document provides an introduction to machine learning, covering its definitions, components, and various techniques such as ANN, clustering, and reinforcement learning. It discusses the history of machine learning, notable milestones, and applications across different fields like finance, medicine, and telecommunications. Additionally, it outlines the steps for designing a learning system and the distinction between machine learning and artificial intelligence.

Uploaded by

jaiswaranagh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views120 pages

Unit-1 ML

The document provides an introduction to machine learning, covering its definitions, components, and various techniques such as ANN, clustering, and reinforcement learning. It discusses the history of machine learning, notable milestones, and applications across different fields like finance, medicine, and telecommunications. Additionally, it outlines the steps for designing a learning system and the distinction between machine learning and artificial intelligence.

Uploaded by

jaiswaranagh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MACHINE LEARNING

TECHNIQUES (BCS-055)
UNIT-1
INTRODUCTION
Topic to be discussed:
1. What is learning
2. Types of learning
3. Well-defined learning problem
4. Designing a learning system
5. History of Machine learning
6. ML approaches
a. ANN
b. Clustering
c. Reinforcement learning
d. Decision Tree learning
e. SVM
f. Genetic Approach
g. Bayesian Network
7. Issues in ML
8. Data Science VS Machine learning
LEARNING
Definition
A computer program is said to learn from experience E with respect to some
class of tasks T and performance measure P, if its performance at tasks T, as
measured by P, improves with experience E.

Examples
i) Handwriting recognition learning problem
• Task T: Recognising and classifying handwritten words within
images
• Performance P: Percent of words correctly classified
• Training experience E: A dataset of handwritten words with given
classifications
ii) A robot driving learning problem
• Task T: Driving on highways using vision sensors
• Performance measure P: Average distance traveled before an error
• training experience: A sequence of images and steering commands
recorded while observing a human driver
iii) A chess learning problem
• Task T: Playing chess
• Performance measure P: Percent of games won against opponents
• Training experience E: Playing practice games against itself
Definition
A computer program which learns from experience is called a machine learning
program or simply a learning program. Such a program is sometimes also referred to as
a learner.
COMPONENTS OF LEARNING
•Basic components of learning process
•The learning process, whether by a human or a machine,
can be divided into four components, namely, data storage,
abstraction, generalization and evaluation.

•Figure 1.1 illustrates the various components and the steps


involved in the learning process.
FIGURE 1.1
DATA STORAGE

• Facilities for storing and retrieving huge amounts of data are an


important component of the learning process. Humans and
computers alike utilize data storage as a foundation for advanced
reasoning.
• In a human being, the data is stored in the brain and data is
retrieved using electrochemical signals.
• Computers use hard disk drives, flash memory, random access
memory and similar devices to store data and use cables and other
technology to retrieve data.
ABSTRACTION

• The second component of the learning process is known as


abstraction. Abstraction is the process of extracting knowledge
about stored data. This involves creating general concepts about the
data as a whole.
• The creation of knowledge involves application of known models
and creation of new models.
• The process of fitting a model to a dataset is known as training.
When the model has been trained, the data is transformed into an
abstract form that summarizes the original information.
GENERALISATION
• The third component of the learning process is known as
generalisation.
• The term generalization describes the process of turning the
knowledge about stored data into a form that can be utilized for future
action.
• These actions are to be carried out on tasks that are similar, but not
identical, to those what have been seen before. In generalization, the
goal is to discover those properties of the data that will be most
relevant to future tasks.
EVALUATION
•Evaluation is the last component of the learning
process. It is the process of giving feedback to the user
to measure the utility of the learned knowledge.

•This feedback is then utilised to effect improvements


in the whole learning process
MACHINE LEARNING
•Arthur Samuel, an early American leader in the field of
computer gaming and artificial intelligence, coined the term
“Machine Learning” in 1959 while at IBM. He defined
machine learning as “the field of study that gives computers
the ability to learn without being explicitly programmed.”
However, there is no universally accepted definition for
machine learning. Different authors define the term
differently. We give below two more definitions.
1. Machine learning is programming computers to optimize a
performance criterion using example data or past experience. We have a
model defined up to some parameters, and learning is the execution of a
computer program to optimize the parameters of the model using the
training data or past experience. The model may be predictive to make
predictions in the future, or descriptive to gain knowledge from data, or
both.
2. The field of study known as machine learning is concerned with the
question of how to construct computer programs that automatically
improve with experience.
ARTICIFICAL INTELLIGENCE
Artificial Intelligence (AI):
• In today's world, technology is growing very fast, and we are getting in touch
with different new technologies day by day.
• Here, one of the booming technologies of computer science is Artificial
Intelligence which is ready to create a new revolution in the world by making
intelligent machines.
• Artificial Intelligence is composed of two words Artificial and Intelligence,
where Artificial defines "man-made," and intelligence defines "thinking
power", hence AI means "a man-made thinking power.“
• So, we can define AI as: "It is a branch of computer science by which we can
create intelligent machines which can behave like a human, think like humans,
and able to make decisions.“
• Artificial Intelligence exists when a machine can have human based skills
such as learning, reasoning, and solving problems.
Why AI?
• With the help of AI, you can create such software or devices which can
solve real-world problems very easily and with accuracy such as
health issues, marketing, traffic issues, etc.
• With the help of AI, you can create your personal virtual Assistant,
such as Cortana, Google Assistant, Siri, etc.
• With the help of AI, you can build such Robots which can work in an
environment where survival of humans can be at risk.
• AI opens a path for other new technologies, new devices, and new
Opportunities.
DEEP LEARNING
• Deep learning is based on the branch of machine learning, which is a subset
of artificial intelligence.
• Since neural networks imitate the human brain and so deep learning will do.
In deep learning, nothing is programmed explicitly. • Basically, it is a
machine learning class that makes use of numerous nonlinear processing
units so as to perform feature extraction as well as transformation.
• IDEA: Deep learning is implemented with the help of Neural Networks, and the idea
behind the motivation of Neural Network is the biological neurons, which is nothing
but a brain cell.
• Deep learning is a collection of statistical techniques of machine learning for
learning feature hierarchies that are actually based on artificial neural
networks.
APPLICATIONS OF MACHINE
LEARNING
• Application of machine learning methods to large databases is called
data mining. In data mining, a large volume of data is processed to
construct a simple model with valuable use, for example, having high
predictive accuracy.
The following is a list of some of the typical applications of machine learning.

1. In retail business, machine learning is used to study consumer behaviour.


2. In finance, banks analyze their past data to build models to use in credit
applications, fraud detection, and the stock market.
3. In manufacturing, learning models are used for optimization, control, and
troubleshooting.
4. In medicine, learning programs are used for medical diagnosis.
5. In telecommunications, call patterns are analyzed for network optimization and
maximizing the quality of service.
6. In science, large amounts of data in physics, astronomy, and biology can only be
analyzed fast enough by computers. The World Wide Web is huge; it is constantly
growing and searching for relevant information cannot be done manually.
7. In artificial intelligence, it is used to teach a system to learn and adapt to changes
so that the system designer need not foresee and provide solutions for all possible
situations.
8. It is used to find solutions to many problems in vision, speech recognition, and
robotics.
9. Machine learning methods are applied in the design of computer-controlled
vehicles to steer correctly when driving on a variety of roads.
10. Machine learning methods have been used to develop programmes for playing
games such as chess, backgammon and Go.
WELL-DEFINED LEARNING PROBLEM
• A computer program is said to learn from experience E in context to
some task T and some performance measure P, if its performance on T,
as was measured by P, upgrades with experience E.

• Any problem can be segregated as well-posed learning problem if it


has three traits –

• Task
• Performance Measure
• Experience
1. To better filter emails as spam or not
Task – Classifying emails as spam or not
Performance Measure – The fraction of emails accurately classified as
spam or not spam
Experience – Observing you label emails as spam or not spam
2. A checkers learning problem
Task – Playing checkers game
Performance Measure – percent of games won against opposer
Experience – playing implementation games against itself
3. Handwriting Recognition Problem
Task – Acknowledging handwritten words within portrayal
Performance Measure – percent of words accurately classified
Experience – a directory of handwritten words with given classifications
4. A Robot Driving Problem
Task – driving on public four-lane highways using sight scanners
Performance Measure – average distance progressed before a fallacy
Experience – order of images and steering instructions noted down
while observing a human driver
[Link] Prediction Problem
Task – forecasting different fruits for recognition
Performance Measure – able to predict maximum variety of fruits
Experience – training machine with the largest datasets of fruits images
6. Face Recognition Problem
Task – predicting different types of faces
Performance Measure – able to predict maximum types of faces
Experience – training machine with maximum amount of datasets of
different face images
[Link] Translation of documents
Task – translating one type of language used in a document to other
language
Performance Measure – able to convert one language to other efficiently
Experience – training machine with a large dataset of different types of
languages
DESIGNING A LEARNING SYSTEM
According to Tom Mitchell, “A computer program is said to be learning
from experience (E), with respect to some task (T). Thus, the
performance measure (P) is the performance at task T, which is
measured by P, and it improves with experience E.”
Example: In Spam E-Mail detection,
Task, T: To classify mails into Spam or Not Spam.
Performance measure, P: Total percent of mails being correctly
classified as being “Spam” or “Not Spam”.
Experience, E: Set of Mails with label “Spam”
STEPS FOR DESIGNING LEARNING
SYSTEM
Step 1) Choosing the Training Experience: The very important and
first task is to choose the training data or training experience which will
be fed to the Machine Learning Algorithm. It is important to note that
the data or experience that we fed to the algorithm must have a
significant impact on the Success or Failure of the Model. So Training
data or experience should be chosen wisely.
Below are the attributes which will impact on Success and Failure of Data:
The training experience will be able to provide direct or indirect feedback regarding
choices. For example: While Playing chess the training data will provide feedback to
itself like instead of this move if this is chosen the chances of success increases.
Second important attribute is the degree to which the learner will control the
sequences of training examples. For example: when training data is fed to the
machine then at that time accuracy is very less but when it gains experience while
playing again and again with itself or opponent the machine algorithm will get
feedback and control the chess game accordingly.
Third important attribute is how it will represent the distribution of examples over
which performance will be measured. For example, a Machine learning algorithm
will get experience while going through a number of different cases and different
examples. Thus, Machine Learning Algorithm will get more and more experience by
passing through more and more examples and hence its performance will increase.
Step 2- Choosing target function: The next important step is choosing
the target function. It means according to the knowledge fed to the
algorithm the machine learning will choose NextMove function which
will describe what type of legal moves should be taken. For example :
While playing chess with the opponent, when opponent will play then
the machine learning algorithm will decide what be the number of
possible legal moves taken in order to get success.
Step 3- Choosing Representation for Target function: When the
machine algorithm will know all the possible legal moves the next step
is to choose the optimized move using any representation i.e. using
linear Equations, Hierarchical Graph Representation, Tabular form etc.
The NextMove function will move the Target move like out of these
move which will provide more success rate. For Example : while
playing chess machine have 4 possible moves, so the machine will
choose that optimized move which will provide success to it.
Step 4- Choosing Function Approximation Algorithm: An optimized
move cannot be chosen just with the training data. The training data had
to go through with set of example and through these examples the
training data will approximates which steps are chosen and after that
machine will provide feedback on it. For Example : When a training
data of Playing chess is fed to algorithm so at that time it is not
machine algorithm will fail or get success and again from that failure or
success it will measure while next move what step should be chosen and
what is its success rate.
Step 5- Final Design: The final design is created at last when system
goes from number of examples , failures and success , correct and
incorrect decision and what will be the next step etc. Example:
DeepBlue is an intelligent computer which is ML-based won chess
game against the chess expert Garry Kasparov, and it became the first
computer which had beaten a human chess expert.
HISTORY AND EVOLUTION OF
MACHINE LEARNING:A TIMELINE
• Through the decades after the 1940s, the evolution of machine learning includes
some of the more notable developments:

• Pioneers named Turing, Samuel, McCarthy, Minsky, Edmonds and Newell dotted
the machine learning landscape in the 1950s, when the Turing Test, the first
artificial neural network, and the terms artificial intelligence and machine
learning were conceived.
• Eliza, the first chatbot; Shakey, the first mobile intelligent robot; Stanford Cart, a
video-controlled remote vehicle; and the foundations of deep learning were
developed in the 1960s.
• Programs that recognize patterns and handwritten characters, solve problems based
on natural selection, seek appropriate actions, create rules to discard unimportant
information, and learn like a baby learns to pronounce words highlighted the 1970s
and 1980s.
• Programs capable of playing backgammon and chess threatened the
domains of top-tier backgammon players and the reigning world chess
champion in the 1990s.
• IBM Watson defeated the all-time Jeopardy! champion in 2011. (Do
you recognize a pattern here?) Personal assistants, generative
adversarial networks, facial recognition, deepfakes, motion sensing,
autonomous vehicles, multimodal chatbot interfaces to LLMs, and
content and image creation through the democratization of AI tools
have emerged so far in the 2000s.
• 1943
• Logician Walter Pitts and neuroscientist Warren McCulloch published the
first mathematical modeling of a neural network to create algorithms that
mimic human thought processes.
• 1949
• Donald Hebb published The Organization of Behavior: A
Neuropsychological Theory, a seminal book on machine learning
development focusing on how behavior and thought in terms of brain
activity relate to neural networks.
• 1950
• Alan Turing published Computing Machinery and Intelligence, which
introduced the Turing test and opened the door to what would be known as
AI.
• 1951
• Marvin Minsky and Dean Edmonds developed SNARC, the first artificial
neural network (ANN), using 3,000 vacuum tubes to simulate a network of
40 neurons.
• 1952
• Arthur Samuel created the Samuel Checkers-Playing Program, the world's
first self-learning program to play games.
• 1956
• John McCarthy, Marvin Minsky, Nathaniel Rochester and Claude Shannon
coined the term artificial intelligence in a proposal for a workshop widely
recognized as a founding event of the AI field.
• Allen Newell, Herbert Simon and Cliff Shaw wrote Logic Theorist, the first
AI program deliberately engineered to perform automated reasoning.
• 1958
• Frank Rosenblatt developed the perceptron, an early ANN that could learn
from data and became the foundation for modern neural networks.
• 1959
• Arthur Samuel coined the term machine learning in a seminal paper
explaining that the computer could be programmed to outplay its
programmer.
• Oliver Selfridge published "Pandemonium: A Paradigm for Learning," a
landmark contribution to machine learning that described a model capable
of adaptively improving itself to find patterns in events.
• 1960
• Mechanical engineering graduate student James Adams constructed the
Stanford Cart to support his research on the problem of controlling a remote
vehicle using video information.
• 1963
• Donald Michie developed a program named MENACE, or Matchbox
Educable Noughts and Crosses Engine, which learned how to play a
perfect game of tic-tac-toe.
• 1965
• Edward Feigenbaum, Bruce G. Buchanan, Joshua Lederberg and Carl
Djerassi developed DENDRAL, the first expert system, which assisted
organic chemists in identifying unknown organic molecules.
• 1966
• Joseph Weizenbaum created computer program Eliza, capable of engaging
in conversations with humans and making them believe the software has
human-like emotions.
• Stanford Research Institute developed Shakey, the world's first mobile
intelligent robot that combined AI, computer vision, navigation capabilities
and natural language processing (NLP). It became known as the grandfather
of self-driving cars and drones.
TYPES OF MACHINE LEARNING
There are so many different types of Machine Learning systems that it is
useful to classify them in broad categories, based on the following criteria:
• 1. Whether or not they are trained with human supervision (supervised,
unsupervised, semi supervised, and Reinforcement Learning)
• 2. Whether or not they can learn incrementally on the fly (online versus
batch learning)
• [Link] they work by simply comparing new data points to known data
points, or instead by detecting patterns in the training data and building a
predictive model, much like scientists do (instance-based versus
model-based learning).
SUPERVISED LEARNING
• As its name suggests, supervised machine learning is based on
supervision.
• It means in the supervised learning technique, we train the machines
using the "labelled" dataset, and based on the training, the machine
predicts the output.
• The main goal of the supervised learning technique is to map the input
variable(x) with the output variable(y). Some real-world applications
of supervised learning are Risk Assessment, Fraud Detection, Spam
filtering, etc.
CATEGORIES OF SUPERVISED
LEARNING
• Supervised machine learning can be classified into two types of
problems, which are given below:

• Classification

• Regression
CLASSIFICATION
• Classification algorithms are used to solve the classification problems
in which the output variable is categorical, such as "Yes" or No, Male
or Female, Red or Blue, etc.

• The classification algorithms predict the categories present in the dataset


• Some real-world examples of classification algorithms are Spam Detection,
Email filtering, etc.
• Some popular classification algorithms are given below:

• Random Forest Algorithm


• Decision Tree Algorithm
• Logistic Regression Algorithm
• Support Vector Machine Algorithm
REGRESSION
• Regression algorithms are used to solve regression problems in which
there is a linear relationship between input and output variables.

• These are used to predict continuous output variables, such as market


trends, weather prediction, etc.
• Some popular Regression algorithms are given below:

• Simple Linear Regression Algorithm


• Multivariate Regression Algorithm
• Decision Tree Algorithm
• Lasso Regression
ADVANTAGES OF SUPERVISED
• Since supervised learning work with the labelled dataset so we can
have an exact idea about the classes of objects.

• These algorithms are helpful in predicting the output on the basis of


prior experience.
DISADVANTAGES OF SUPERVISED
• These algorithms are not able to solve complex tasks.

• It may predict the wrong output if the test data is different from the
training data.

• It requires lots of computational time to train the algorithm.


UNSUPERVISED LEARNING
• 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 w

• The main aim of the unsupervised learning algorithm is to group or


categories the unsorted dataset according to the similarities, patterns, and
differences.
• Machines are instructed to find the hidden patterns from the input dataset
CATEGORIES OF UNSUPERVISED
• Unsupervised Learning can be further classified into two types, which
are given below:

• Clustering

• Association
CLUSTERING
• The clustering technique is used when we want to find the inherent
groups from the data.

• It is a way to group the objects into a cluster such that the objects with
the most similarities remain in one group and have fewer or no
similarities with the objects of other groups.

• An example of the clustering algorithm is grouping the customers by


their purchasing behavior.
CLUSTERING ALGORITHM
• K-Means Clustering algorithm

• Mean-shift algorithm

• DBSCAN Algorithm

• Principal Component Analysis

• Independent Component Analysis


ASSOCIATION
• Association rule learning is an unsupervised learning technique, which
finds interesting relations among variables within a large dataset.
• The main aim of this learning algorithm is to find the dependency of
one data item on another data item and map those variables
accordingly so that it can generate maximum profit.

• Some popular algorithms of Association rule learning are Apriori


Algorithm, Eclat, FP-growth algorithm.
ADVANTAGES
• These algorithms can be used for complicated tasks compared to the
supervised ones because these algorithms work on the unlabeled
dataset.
• Unsupervised algorithms are preferable for various tasks as getting the
unlabeled dataset is easier as compared to the labelled dataset.
DISADVANTAGES
• 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.

• Working with Unsupervised learning is more difficult as it works with


the unlabeled dataset that does not map with the output.
SEMI-SUPERVISED
• Semi-Supervised learning is a type of Machine Learning algorithm
that lies between Supervised and Unsupervised machine learning.

• It represents the intermediate ground between Supervised (With


Labelled training data) and Unsupervised learning (with no labelled
training data) algorithms and uses the combination of labelled and
unlabeled datasets during the training period.
To overcome the drawbacks of supervised learning and
unsupervised learning algorithms, the concept of
Semi-supervised learning is introduced.
• 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- analyzing 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
• It is simple and easy to understand the algorithm.

• It is highly efficient.

• It is used to solve drawbacks of Supervised and Unsupervised


Learning algorithms.
DISADVANTAGES
• Iterations results may not be stable.

• We cannot apply these algorithms to network-level data.

• Accuracy is low.
REINFORCEMENT LEARNING
• Reinforcement learning works on a feedback-based process, in which an AI
agent (A software component) automatically explore its surrounding by
hitting & trail, taking action, learning from experiences, and improving its
performance.

• Agent gets rewarded for each good action and get punished for each bad
action; hence the goal of reinforcement learning agent is to maximize the
rewards.

• 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.
CATEGORIES OF REINFORCEMENT
• Reinforcement learning is categorized mainly into two types of
methods/algorithms:
• Positive Reinforcement Learning: Positive reinforcement learning specifies
increasing the tendency that the required behavior would occur again by
adding something. It enhances the strength of the behavior of the agent and
positively impacts it.
• Negative Reinforcement Learning: Negative reinforcement learning works
exactly opposite to the positive RL. It increases the tendency that the specific
behavior would occur again by avoiding the negative condition.
Real-world Use cases of Reinforcement
Learning
• Video Games

• Robotics

• Text Mining
INTRODUCTION OF ML APPROACH
a. ANN
b. Clustering
c. Reinforcement learning
d. Decision Tree learning
e. SVM
f. Genetic Approach
g. Bayesian Network
ANN
• A computer system that mimics the information processing of the
human brain is called an artificial neural network, or ANN.
• It is classified as artificial intelligence and is very good at resolving
complicated problems that could be difficult for humans to handle.
Because ANNs are self-learning, they perform better when there is
more data available.
• Artificial Neural Networks work collectively and concurrently,
imitating biological neural networks. They are used in many different
fields, like regression problems, pattern recognition, recommendation
systems, and weather forecasting.
• An artificial neuron is the building block of an artificial neural
network. Artificial neural networks, like the biological neural network
in the human body, have a layered architecture, and each network node
(connection point) can process input and forward output to other nodes
in the network.
• ANNs are composed of artificial neurons arranged in input, hidden,
and output layers, employing a connectionist approach to computation.
• They use nonlinear statistical data modelling techniques to uncover
intricate relationships between inputs and outputs. This enables the
prediction or classification of complex problems.
KEY COMPONENTS OF ARTIFICAL
NEURONS
• Interconnecting model of neurons: The neuron is the elementary
component connected with other neurons to form the network.

• Learning algorithm: This is to train the network, as various learning


algorithms are available in the literature to train the model.
• Each layer consists of neurons, and these neurons are connected to other
layers.
• Weight is also assigned to each layer, and these weights are changed at each
iteration for training purposes.
HISTROY OF ANN
TYPES OF ANN
• Neural networks can be classified into different types, which are used
for different purposes. The below would be representative of the most
common types of neural networks:
• The Perceptron is the oldest neural network, created by Frank
Rosenblatt in 1958.
• Convolutional neural networks (CNNs), are utilised for image
recognition, pattern recognition, or computer vision.
• Recurrent neural networks (RNNs) are used to make predictions
about future outcomes, such as stock market predictions or sales
forecasting.
ANN VS DL
APPLICATIONS OF ANN
• Weather Prediction: ANNs analyse historical weather data and forecast future conditions.
• They consider various parameters like temperature, humidity, pressure, etc. and can improve the
accuracy of weather predictions over time.
• Pattern Recognition: ANNs are used to identify patterns in data, such as images, speech, or text.
• They find applications in facial recognition like Screen Lock in mobiles, handwriting recognition, etc.
• Facial Recognition: It serves as a robust system of surveillance. Recognition Systems match the human face
and compare it with digital images.
• They are used in offices for selective entries. The systems thus authenticate a human face and match it
up with the list of IDs that are present in its database. For example, Face Screen Locks in Mobiles, etc.
• Recommendation Systems: ANNs power recommendation engines in e-commerce like Flipkart or
Amazon, streaming services like Netflix, and social media platforms like Instagram or Facebook.
• They analyse user behaviour and preferences to suggest relevant products, content, or connections.
• Sales and Marketing: ANNs can predict customer
behaviour,preferences, and buying patterns.
• They optimise marketing strategies, targeting, and product recommendations
to boost sales through online ads.
• Healthcare: ANNs assist in medical image analysis for tasks
like tumour detection, MRI analysis, and X-ray interpretation.
• They can predict disease outcomes, assist in diagnosis, and personalise
treatment plans.
• Education: ANNs can be used for adaptive learning systems.
• They analyse student performance and behaviour to provide personalised
learning materials and recommendations.
ISSUES ASSOCIATED WITH ANN
• Intentional Abuse: With the rise of sophisticated AI capabilities, there is
a growing concern regarding intentional misuse.
• Technologies like "deep fakes" show how individuals with malicious intent can
exploit AI for deceptive purposes.
• ANN in war: The integration of AI and Neural Networks into lethal
autonomous weapons (LAWs) like Killer Robot poses immediate and
severe risks.
• It raises questions about the ethical implications of machines making life-and-death
decisions.
• Influences Decision-Making: AI's influence on how people perceive
information and make decisions is already evident.
• The algorithms that can curate content on social media platforms have the power to
shape public opinion which can reinforce discriminatory views or biases in society
like Patriarchy or Caste views, etc.
• Social Gaps: The integration of AI and technology into daily life has
created both opportunities and disparities.
• While some benefit from AI, others may face job displacement and economic
inequalities.
• Affecting Human Dignity and Autonomy: As AI becomes more
autonomous and capable, there is a risk of diminishing the role of
humans in critical decision-making processes.
• Safeguarding human agency and ensuring that we remain, stewards of our
own civilization is a profound ethical challenge.
REINFORCEMENT LEARNING
• Reinforcement learning works on a feedback-based process, in which
an AI agent (A software component) automatically explore its
surrounding by hitting & trail, taking action, learning from
experiences, and improving its performance.
• Agent gets rewarded for each good action and get punished for each
bad action; hence the goal of reinforcement learning agent is to
maximize the rewards.
• 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.
Categories of RL
• Positive Reinforcement Learning: Positive reinforcement learning
specifies increasing the tendency that the required behavior would
occur again by adding something. It enhances the strength of the
behavior of the agent and positively impacts it.
• Negative Reinforcement Learning: Negative reinforcement learning
works exactly opposite to the positive RL. It increases the tendency that
the specific behavior would occur again by avoiding the negative
condition.
REAL-WORLD USE CASES OF RL
• Video Games
• Robotics
• Text Mining
CLUSTERING
• Organizing data into clusters such that there is
• high intra-cluster similarity
• low inter-cluster similarity
• Informally, finding natural groupings among objects.

•Why do we want to do that?


•Any REAL application?
Example: clusty
Why Clustering?
• Organizing data into clusters provides information about the internal
structure of the data
• – Ex. Clusty and clustering genes above

• Sometimes the partitioning is the goal


– Ex. Image segmentation

• Knowledge discovery in data


– Ex. Underlying rules, reoccurring patterns, topics, etc.
TYPES OF CLUSTERING
• Hard Clustering: In this type of clustering, each data point belongs to
a cluster completely or not. For example, Let’s say there are 4 data
point and we have to cluster them into 2 clusters. So each data point
will either belong to cluster 1 or cluster 2.
• Soft Clustering: In this type of clustering, instead of assigning each
data point into a separate cluster, a probability or likelihood of that
point being that cluster is evaluated. For example, Let’s say there are 4
data point and we have to cluster them into 2 clusters. So we will be
evaluating a probability of a data point belonging to both clusters. This
probability is calculated for all data points.
USES OF CLUSTERING
• Clustering algorithms are majorly used for:
• Market Segmentation – Businesses use clustering to group their customers
and use targeted advertisements to attract more audience.
• Market Basket Analysis – Shop owners analyze their sales and figure out
which items are majorly bought together by the customers. For example, In
USA, according to a study diapers and beers were usually bought together
by fathers.
• Social Network Analysis – Social media sites use your data to understand
your browsing behavior and provide you with targeted friend
recommendations or content recommendations.
• Medical Imaging – Doctors use Clustering to find out diseased areas in
diagnostic images like X-rays.
• Anomaly Detection – To find outliers in a stream of real-time dataset
or forecasting fraudulent transactions we can use clustering to identify
them.
• Simplify working with large datasets – Each cluster is given a cluster
ID after clustering is complete. Now, you may reduce a feature set’s
whole feature set into its cluster ID. Clustering is effective when it can
represent a complicated case with a straightforward cluster ID. Using
the same principle, clustering data can make complex datasets simpler.
DECISION TREE LEARNING
• A decision tree is a very common algorithm that we humans use to
make many different decisions. You may be using one without
realizing it.
• A decision tree is a simple model for supervised classification. It is
used for classifying a single discrete target feature.
• Each internal node performs a Boolean test on an input feature (in
general, a test may have more than two options, but these can be
converted to a series of Boolean tests).
• The edges are labeled with the values of that input feature. Each leaf
node specifies a value for the target feature.
DECISION TREE REPRESENTATION
• Decision trees classify instances by sorting them down the tree from
the root to some leaf node, which provides the classification of the
instance. In the decision tree representation:
• Each internal node tests an attribute
• Each branch corresponds to attribute value
Decision Trees and Logical Operations:
• AND ( ∧ ):
• This means all conditions must be true for a specific outcome.
• In a decision tree, one full path from the top (root) to the end (leaf) is like an AND. For example, if we want
"A and B" to be true, both conditions must be satisfied along the path.
• OR ( ∨ ):
• This means at least one of the conditions must be true.
• In a decision tree, there are many paths from the root to the leaf. These different paths are like OR. For
example, either Path 1 or Path 2 could be true, and that would make the whole condition true.
• XOR:
• XOR means only one condition can be true, but not both.
• In a decision tree, XOR can be represented by making sure that only one of two options is true at a time. For
example, "A XOR B" means A is true, or B is true, but not both together.
• Example:
• Let’s break down this expression: (A∧B)∨(C∧¬D∧E)(A ∧ B) ∨ (C ∧ \neg D ∧ E)(A∧B)∨(C∧¬D∧E)
• This says: Either "A and B" both need to be true, OR "C and E" must be true but D must be false.
• In a decision tree, one path would check A and B, and another path would check C, not D (false), and E.
GENETIC ALGORITHM
• Genetic Algorithms are the heuristic search and optimization
techniques that mimic the process of natural evolution.
• Genetic Algorithm (GA) is a search-based optimization technique
based on the principles of Genetics and Natural Selection.
• It is frequently used to find optimal or near-optimal solutions to
difficult problems which otherwise would take a lifetime to solve. It is
frequently used to solve optimization problems, in research, and in
machine learning
• Optimization is the process of making something better. In any
process, we have a set of inputs and a set of outputs as shown in the
following figure.
• Optimization refers to finding the values of inputs in such a way that
we get the “best” output values. The definition of “best” varies from
problem to problem, but in mathematical terms, it refers to
maximizing or minimizing one or more objective functions, by
varying the input parameters.
• The set of all possible solutions or values which the inputs can take
make up the search space. In this search space, lies a point or a set of
points which gives the optimal solution. The aim of optimization is to
find that point or set of points in the search space
• Nature has always been a great source of inspiration to all mankind.
Genetic Algorithms (GAs) are search based algorithms based on the
concepts of natural selection and genetics. GAs are a subset of a much
larger branch of computation known as Evolutionary Computation.
GAs were developed by John Holland and his students and colleagues
at the University of Michigan, most notably David E. Goldberg and
has since been tried on various optimization problems with a high
degree of success.
• In GAs, we have a pool or a population of possible solutions to the
given problem. These solutions then undergo recombination and
mutation (like in natural genetics), producing new children, and the
process is repeated over various generations. Each individual (or
candidate solution) is assigned a fitness value (based on its objective
function value) and the fitter individuals are given a higher chance to
mate and yield more “fitter” individuals. This is in line with the
Darwinian Theory of “Survival of the Fittest”.
• In this way we keep “evolving” better individuals or solutions over
generations, till we reach a stopping criterion. Genetic Algorithms are
sufficiently randomized in nature, but they perform much better than
random local search (in which we just try various random solutions,
keeping track of the best so far), as they exploit historical information
as well.
ADVANTAGES OF GENETIC
ALGORITHM
• Does not require any derivative information (which may not be available for
many real world problems).
• Is faster and more efficient as compared to the traditional methods.
• Has very good parallel capabilities.
• Optimizes both continuous and discrete functions and also multi-objective
problems.
• Provides a list of “good” solutions and not just a single solution.
• Always gets an answer to the problem, which gets better over the time.
• Useful when the search space is very large and there are a large number of
parameters involved.
Some Drawbacks:
• GAs are not suited for all problems, especially problems which are
simple and for which derivative information is available.
• Fitness value is calculated repeatedly which might be computationally
expensive for some problems.
• Being stochastic, there are no guarantees on the optimality or the
quality of the solution.
• If not implemented properly, the GA may not converge to the optimal
solution.
SVM
Support Vector Machine (SVM) is a supervised machine
learning algorithm used for both classification and regression. Though
we say regression problems as well it’s best suited for classification.
The main objective of the SVM algorithm is to find the
optimal hyperplane in an N-dimensional space that can separate the data
points in different classes in the feature space.
SVM chooses the extreme points/vectors that help in creating the
hyperplane. These extreme cases are called as support vectors, and
hence algorithm is termed as Support Vector Machine. Consider the
below diagram in which there are two different categories that are
classified using a decision boundary or hyperplane:
• Example:
SVM can be understood with the example that we have used in the KNN
classifier. Suppose we see a strange cat that also has some features of dogs, so
if we want a model that can accurately identify whether it is a cat or dog, so
such a model can be created by using the SVM algorithm.
We will first train our model with lots of images of cats and dogs so that it can
learn about different features of cats and dogs, and then we test it with this
strange creature. So as support vector creates a decision boundary between
these two data (cat and dog) and choose extreme cases (support vectors), it
will see the extreme case of cat and dog. On the basis of the support vectors, it
will classify it as a cat. Consider the below diagram:
SVM can be of two types:

Linear SVM: Linear SVM is used for linearly separable data, which means
if a dataset can be classified into two classes by using a single straight line,
then such data is termed as linearly separable data, and classifier is used
called as Linear SVM classifier.
Non-linear SVM: Non-Linear SVM is used for non-linearly separated data,
which means if a dataset cannot be classified by using a straight line, then
such data is termed as non-linear data and classifier used is called as
Non-linear SVM classifier.
Support Vector Machine Use Cases

•Image Classification: Identifying objects in images, like recognizing faces


or animals.
•Text Categorization: Sorting documents into categories like spam or
not-spam in emails.
•Bioinformatics: Classifying proteins or genes based on biological data.
•Handwriting Recognition: Identifying letters and digits in handwriting.
•Stock Market Prediction: Predicting stock price trends based on historical
data
BAYESIAN NETWORK

• A Bayesian network is a graphical model representing probabilistic


relationships among variables. This helps in understanding how
different factors influence each other and in predicting the behavior of
one variable based on the others.
About
•Understanding and Visualization: Bayesian networks make it easy to see how
different factors are connected. This helps people understand complicated data
relationships.
•Probabilistic Inference: They are great for predicting uncertain events. You can
figure out how likely certain things are to happen based on what you know.
•Decision Making: They help in making decisions by considering uncertainty and
different possible outcomes.
•Handling Missing Data: They can deal with incomplete data by guessing missing
information, which is a common problem in real-life data.
•Learning from Data: Bayesian networks can be trained using data to understand
relationships between different variables. Once they learn these relationships, they
can predict future outcomes or events.
Probabilistic Models and Bayesian
Network Vs. Naive Bayes
• Probabilistic models are based on the theory of probability. I guess that was
quite self-explanatory, considering it is in the name.
• Probabilistic models consider the fact that randomness plays a role in
predicting future outcomes. The opposite of randomness is deterministic,
which tells us that something can be predicted exactly without any
underlying randomness.
• A Bayesian Network or Bayes network is a decision tree that graphically
represents the connection of various variables and their conditional
dependencies for predicting the possibilities of an outcome or outcomes.
• Bayesian Network models require high amounts of data to cover all possible
outcomes. In addition, due to the amount of data, the probabilities may be
hard to control and calculate.
• Simplifying this process by using a classifier that assumes the independence
between attributes of data points is called Naive Bayes. Well-known uses of
Naive Bayes classifiers are spam filters, text analysis, and medical
diagnosis.
• A Naive Bayes classifier is a simple model that describes a particular class
of Bayesian network, stating that all the features are class-conditionally
independent.
• There are specific issues that Naive Bayes cannot solve, which is where the
Bayesian Network comes in. However, the simplicity of Naive Bayes makes
it easier to apply and requires less data to get efficient outputs.
• Naive Bayes and Bayesian Networks come from Bayes’ Theorem. So, let’s
get a better understanding of that first.
How to Use a Bayesian Network?
• To develop a Bayesian Network, you must define three elements: Random
Variables, Conditional Relationships, and Probability Distribution.
• Define Variables: Start by identifying the different variables (factors)
involved in the system you are analyzing. These could be anything relevant,
such as weather conditions, user behavior, or machine performance.
• Structure the Network: Arrange these variables in a graph where each node
represents a variable, and the directed edges between them represent
relationships or dependencies.
• Assign Probabilities: For each variable, define conditional probabilities.
These probabilities describe the likelihood of a variable taking a particular
value, given the values of its parent variables (the ones pointing to it).
• Make Predictions or Inferences: Use the network to compute probabilities
for certain events or outcomes. By inputting known values into some of the
nodes, the network can infer the most probable states of other variables.
• Update with New Data: Bayesian networks can update the probability
distributions as new information becomes available, refining predictions.
ISSUES IN ML
1. Data Problems
• Not Enough Data: ML needs a lot of data to work well, and sometimes the data isn't
available.
• Unbalanced Data: Some categories in data are underrepresented, causing biased
results.
• Labeling Issues: Labeled data is needed, but getting it can be slow and expensive.
2. Bias and Fairness
• Biased Data: If the data has biases, the model will too, leading to unfair outcomes.
• Unfair Results: Ensuring that ML systems treat everyone fairly is a challenge.
3. Understanding the Model
• Complex Models: Some ML models are like "black boxes," making it hard to explain
how they work.
• Lack of Trust: People may not trust models they can't understand.
4. Overfitting and Underfitting
• Overfitting: The model performs too well on training data but poorly on new data.
• Underfitting: The model is too simple and fails to capture important patterns.
5. Generalization and Robustness
• Generalization: Models may work well with training data but not with new data.
• Robustness: Models can break when faced with unexpected inputs.
6. Scalability
• Computational Power: Training large models can be expensive and time-consuming.
• Real-Time Use: Some applications need quick results, which is tough for large models.
7. Ethics and Privacy
• Data Privacy: ML often uses personal data, which raises privacy concerns.
• Ethical Issues: ML can lead to unintended consequences, like job loss or biased decisions.
8. Security Risks
• Adversarial Attacks: Hackers can trick models into making wrong predictions.
• Model Vulnerability: Some models are easy to attack or manipulate.
9. Energy Use
• High Energy Consumption: Training ML models uses a lot of power, which isn’t always
sustainable.
10. Regulation
• Compliance: ML applications in sensitive areas must follow strict rules, and keeping up
with regulations can be tough.
DS VS ML
Data science and machine learning are closely connected but have different
areas of focus. Here’s a simplified comparison:
1. What They Are:
• Data Science: Involves exploring, organizing, and analyzing data to discover useful information or
patterns.
• Machine Learning: A branch of data science that deals with creating systems that can learn from data
and make decisions or predictions without being explicitly programmed.
2. Main Focus:
• Data Science: Encompasses the entire process of gathering, cleaning, analyzing, and interpreting data.
• Machine Learning: Concentrates specifically on designing algorithms and models that can learn
from data and make predictions or decisions.
3. Tools Used:
• Data Science: Relies on tools like Excel, Python, R, SQL, and data visualization software to process
and interpret data.
• Machine Learning: Uses tools such as TensorFlow, Scikit-learn, and PyTorch to develop models that
can learn and improve from data.
4. Goals:
• Data Science: Aims to analyze and understand data to provide insights that
guide better decisions.
• Machine Learning: Focuses on building models that automatically predict
outcomes or classify data based on patterns.
5. Results:
• Data Science: Generates insights, reports, and visualizations that explain data
trends and patterns.
• Machine Learning: Produces models that can make automated predictions, such
as recommending items or identifying images.
6. Skills Required:
• Data Science: Involves skills in statistics, data manipulation, and visualization
to interpret and explain data.
• Machine Learning: Requires a strong understanding of algorithms,
mathematics, and programming to create learning models.
THANK YOU

You might also like