Machine Learning Techniques-Bcds062!01!01
Machine Learning Techniques-Bcds062!01!01
BCDS062
By
Dr Ravi Prakash Verma
Professor
Department of CSAI
ABESIT
Syllabus – UNIT 1
• INTRODUCTION –
• Learning
• Types of Learning
• Well defined learning problems
• Designing a Learning System
• History of ML
• Introduction of Machine Learning Approaches –
• Artificial Neural Network
• Clustering
• Reinforcement Learning
• Decision Tree Learning
• Bayesian networks
• Support Vector Machine
• Genetic Algorithm
• Issues in Machine Learning
• Data Science Vs Machine Learning.
Machine Learning
• Machine Learning (ML) is a branch of artificial intelligence (AI) that
enables computers to learn from data and make decisions or
predictions without being explicitly programmed.
• Instead of following a fixed set of rules, ML algorithms identify
patterns in data and improve their performance over time.
• Optimize a performance criterion using example data or past
experience.
• Role of Statistics: Inference from a sample
• Role of Computer science: Efficient algorithms to
• Solve the optimization problem
• Representing and evaluating the model for inference
Machine Learning
• Machine learning (ML) is a branch of artificial intelligence (AI) focused
on enabling computers and machines to imitate the way that humans
learn, to perform tasks autonomously, and to improve their
performance and accuracy through experience and exposure to more
data.
• UC Berkeley breaks out the learning system of a machine learning
algorithm into three main parts.
• A Decision Process:
• In general, ML algorithms are used to make a prediction or classification.
• Based on some input data, which can be labeled or unlabeled, your algorithm
will produce an estimate about a pattern in the data.
Machine Learning
• An Error Function:
• An error function evaluates the prediction of the model.
• If there are known examples, an error function can make a comparison to
assess the accuracy of the model.
• A Model Optimization Process:
• If the model can fit better to the data points in the training set, then weights
are adjusted to reduce the discrepancy between the known example and the
model estimate.
• The algorithm will repeat this iterative “evaluate and optimize”
process, updating weights autonomously until a threshold of accuracy
has been met.
Types of Machine Learning
1.Supervised Learning
1. The model learns from labeled data (input-output pairs).
2. Example: Predicting house prices based on features like size, location, and number
of rooms.
3. Algorithms: Linear Regression, Decision Trees, Support Vector Machines (SVM),
Neural Networks.
2.Unsupervised Learning
1. The model identifies patterns and relationships in data without labeled outputs.
2. Example: Customer segmentation in marketing.
3. Algorithms: K-Means Clustering, Principal Component Analysis (PCA), Autoencoders.
3.Reinforcement Learning
1. The model learns through trial and error by receiving rewards or penalties.
2. Example: AI playing chess or self-driving cars.
3. Algorithms: Q-Learning, Deep Q-Networks (DQN), Policy Gradient Methods.
Applications of Machine Learning
• Some of the applications are
• AI impact on jobs
• AI may shift job demands rather than eliminate them.
• Like the shift from fuel to electric vehicles, AI will create new roles in
managing and improving AI systems.
• The challenge lies in helping workers transition to emerging job opportunities.
Challenges of ML
• AI impact on jobs
• AI may shift job demands rather than eliminate them.
• Like the shift from fuel to electric vehicles, AI will create new roles in
managing and improving AI systems.
• The challenge lies in helping workers transition to emerging job opportunities.
• Privacy
• Privacy concerns have led to stronger data privacy and protection laws like
GDPR (2016) - was created to protect the personal data of people in the
European Union and European Economic Area and California Consumer
Privacy Act (CCPA) (2018)- requires businesses to inform consumers about
the collection of their data, giving individuals more control over their data.
• Businesses now prioritize security to prevent breaches, hacking, and
surveillance.
Challenges of ML
• Bias and discrimination
• Ethical concerns: Bias in AI raises questions about fairness, as training data
often reflects human biases.
• Hiring bias: Amazon’s AI hiring tool unintentionally discriminated against
female candidates, leading to its discontinuation.
• Wider impact: Bias exists in various AI applications, including facial
recognition and social media algorithms.
• Corporate action: Companies like IBM are addressing AI ethics—IBM
discontinued general-purpose facial recognition to prevent misuse.
Challenges of ML
• Accountability
• Lack of AI Regulations and Ethical Challenges
• No strict legislation: AI ethics lack enforcement due to the absence of
regulations.
• Corporate incentives: Companies follow ethical AI mainly to avoid negative
financial impacts.
• Ethical frameworks: Developed through collaboration but serve only as
guidelines.
• Challenges: Distributed responsibility and unforeseen consequences hinder
ethical AI implementation.
Well Defined Learning Problems
• 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 in T, as measured by P, improves with
experience E.
• For example, a computer program that learns to play checkers might
improve its performance (ability to win) at the class of tasks involving
playing checkers games, through experience obtained by playing
games against itself.
• To have a well-defined learning problem, we must identity these
three features:
• The class of tasks
• The measure of performance to be improved
• The source of experience.
Well Defined Learning Problems
• Examples
• There are many algorithms for adjusting the weights like LMS and gradient
descent etc.
Designing A Learning System
Designing A Learning System
• Final Design of Checkers Learning System
1.Performance System
1. Solves the task (playing checkers) using the learned target function.
2. Takes a new game as input and produces game history as output.
3. Uses an evaluation function that improves performance over time.
2.Critic
1. Analyzes the game history and generates training examples.
2. Associates each game state with an estimated target function value.
3. Implements a training rule to refine the evaluation function.
3.Generalizer
1. Converts training examples into a generalized hypothesis.
2. Uses the LMS algorithm to learn the target function.
3. Produces an updated evaluation function based on learned weights.
4.Experiment Generator
1. Generates new problems (initial board states) for training.
2. Maximizes learning by selecting strategic positions.
3. Uses a simple or advanced strategy to improve learning efficiency.
Designing A Learning System
• Design Choices & Constraints
• Uses a linear evaluation function with six board features.
• Limited by the expressiveness of the function representation.
• Capable of learning an approximation of the optimal function.
• Learning Potential
• Can effectively improve gameplay but unlikely to surpass human champions.
• More sophisticated representations (e.g., neural networks) enhance
performance.
• Similar methods applied to backgammon have led to competitive AI players.
Designing A Learning System
• Final design of the checkers learning program.
Designing A Learning System
• Sununary of choices in designing the checkers learning program.
Issues in Machine Learning
• The field of machine learning, is concerned with answering
questions such as the following:
• What algorithms exist for learning general target functions from
specific training examples?
• In what settings will particular algorithms converge to the desired
function, given sufficient training data?
• Which algorithms perform best for which types of problems and
representations?
• How much training data is sufficient?
• What general bounds can be found to relate the confidence in
learned hypotheses to the amount of training experience and the
character of the learner's hypothesis space?
Issues in Machine Learning
• When and how can prior knowledge held by the learner guide the
process of generalizing from examples?
• Can prior knowledge be helpful even when it is only approximately
correct?
• What is the best strategy for choosing a useful next training
experience, and how does the choice of this strategy alter the
complexity of the learning problem?
• What is the best way to reduce the learning task to one or more
function approximation problems? Put another way, what specific
functions should the system attempt to learn?
• Can this process itself be automated?
• How can the learner automatically alter its representation to
improve its ability to represent and learn the target function?
History of Machine Learning
1.Early Foundations (1940s - 1950s)
1. 1943: McCulloch & Pitts propose the first artificial neuron model.
2. 1950: Alan Turing introduces the Turing Test for machine intelligence.
3. 1952: Arthur Samuel develops the first self-learning program (checkers-
playing AI).
2.Symbolic AI & Rule-Based Systems (1950s - 1970s)
1. 1957: Perceptron model introduced by Frank Rosenblatt (early neural
network).
2. 1960s: Early AI research focuses on rule-based learning and expert systems.
3. 1969: Minsky & Papert highlight perceptron limitations, slowing neural
network research.
History of Machine Learning
3. Knowledge-Based Systems & Statistical Learning (1980s - 1990s)
1. 1980s: Development of decision trees and Bayesian networks.
2. 1986: Backpropagation algorithm popularized by Rumelhart, Hinton & Williams, reviving
neural networks.
3. 1990s: Introduction of Support Vector Machines (SVMs) and Random Forests.
4. Rise of Data-Driven Approaches (2000s - 2010s)
1. 2006: Geoffrey Hinton introduces Deep Learning, making neural networks viable again.
2. 2012: AlexNet wins ImageNet competition, marking a breakthrough in deep learning.
3. 2014: Generative Adversarial Networks (GANs) and Reinforcement Learning gain traction.
4. 2016: AlphaGo defeats human Go champion, showcasing deep reinforcement learning.
5. Modern Advances (2020s - Present)
1. Transformer models (GPT, BERT) revolutionize Natural Language Processing (NLP).
2. AI applications expand into healthcare, finance, autonomous systems, and robotics.
3. Ethical AI, interpretability, and bias mitigation become major research areas.
History of Machine Learning
1. Early Foundations (1940s - 1950s)
1. 1943: McCulloch & Pitts propose the first artificial neuron model.
2. 1950: Alan Turing introduces the Turing Test for machine intelligence.
3. 1952: Arthur Samuel develops the first self-learning program (checkers-playing AI).
2. Symbolic AI & Rule-Based Systems (1950s - 1970s)
1. 1957: Perceptron model introduced by Frank Rosenblatt (early neural network).
2. 1960s: Early AI research focuses on rule-based learning and expert systems.
3. 1969: Minsky & Papert highlight perceptron limitations, slowing neural network research.
3. Knowledge-Based Systems & Statistical Learning (1980s - 1990s)
1. 1980s: Development of decision trees and Bayesian networks.
2. 1986: Backpropagation algorithm popularized by Rumelhart, Hinton & Williams, reviving neural networks.
3. 1990s: Introduction of Support Vector Machines (SVMs) and Random Forests.
4. Rise of Data-Driven Approaches (2000s - 2010s)
1. 2006: Geoffrey Hinton introduces Deep Learning, making neural networks viable again.
2. 2012: AlexNet wins ImageNet competition, marking a breakthrough in deep learning.
3. 2014: Generative Adversarial Networks (GANs) and Reinforcement Learning gain traction.
4. 2016: AlphaGo defeats human Go champion, showcasing deep reinforcement learning.
5. Modern Advances (2020s - Present)
1. Transformer models (GPT, BERT) revolutionize Natural Language Processing (NLP).
2. AI applications expand into healthcare, finance, autonomous systems, and robotics.
3. Ethical AI, interpretability, and bias mitigation become major research areas.
History of Machine Learning
• 1. Early Foundations (1940s - 1950s)
• Theoretical Concepts & First Models
• 1943: Warren McCulloch & Walter Pitts introduce the first artificial
neuron model, laying the foundation for neural networks.
• 1950: Alan Turing proposes the Turing Test, a way to determine if a
machine exhibits intelligent behavior.
• 1951: Marvin Minsky & Dean Edmonds build the first neural network
computer (SNARC) using vacuum tubes.
• 1952: Arthur Samuel develops a self-learning checkers program, one
of the earliest examples of machine learning.
• 1957: Frank Rosenblatt invents the Perceptron, the first supervised
learning algorithm for pattern recognition.
History of Machine Learning
• 2. Symbolic AI & Rule-Based Systems (1960s - 1970s)
• Emergence of Expert Systems & AI Winter
• 1960s:
• Research in AI focuses on symbolic reasoning and expert systems, using
manually encoded rules.
• First machine learning models based on decision trees appear.
• 1967: The nearest neighbor algorithm is introduced, enabling basic
pattern classification.
• 1969: Marvin Minsky & Seymour Papert publish Perceptrons, proving
that single-layer perceptrons are limited and cannot learn XOR
functions.
• This leads to decreased funding for neural networks, causing the first "AI
Winter" (1970s).
History of Machine Learning
• 3. Knowledge-Based Systems & Statistical Learning (1980s - 1990s)
• Revival of Machine Learning & Probabilistic Models
• 1980s:
• Introduction of decision trees (e.g., ID3 algorithm by Ross Quinlan).
• Expert systems like MYCIN (medical diagnosis) gain popularity.
• Backpropagation algorithm (Hinton, Rumelhart, & Williams, 1986) allows multi-
layer neural networks to train effectively, reviving neural networks.
• 1990s:
• Shift from rule-based AI to statistical machine learning methods.
• Introduction of Support Vector Machines (SVMs) (Vladimir Vapnik, 1995).
• Development of Random Forests, an ensemble learning method.
• Naïve Bayes Classifier and Hidden Markov Models (HMMs) improve text and
speech recognition.
• Reinforcement Learning gains momentum, with Q-learning becoming a popular
technique.
History of Machine Learning
• 4. Rise of Data-Driven Approaches (2000s - 2010s)
• Big Data & Deep Learning Revolution
• 2006: Geoffrey Hinton introduces Deep Learning, using Restricted Boltzmann
Machines (RBMs) for feature learning.
• 2009: The emergence of Big Data enables large-scale machine learning models.
• 2012: AlexNet (deep convolutional neural network) wins the ImageNet competition,
marking the breakthrough of Deep Learning in computer vision.
• 2013: Word2Vec, a deep learning technique for word embeddings, revolutionizes
Natural Language Processing (NLP).
• 2014:
• Ian Goodfellow introduces Generative Adversarial Networks (GANs) for synthetic data
generation.
• Deep Reinforcement Learning emerges, combining deep learning with decision-making
algorithms.
• 2015: Google’s AlphaGo defeats a professional human Go player, later defeating the
world champion in 2016.
• 2017: Google introduces the Transformer architecture, leading to breakthroughs in
NLP models like BERT and GPT.
History of Machine Learning
• 5. Modern Advances (2020s - Present)
• AI in the Real World & Ethical Challenges
• 2020: GPT-3 is released, demonstrating human-like text generation with
175 billion parameters.
• 2021: AI models become more specialized in fields like medicine
(AlphaFold for protein folding) and autonomous vehicles.
• 2022:
• ChatGPT (GPT-3.5 & GPT-4) revolutionizes conversational AI.
• DALL·E 2 and Stable Diffusion improve AI-generated art.
• 2023-Present:
• AI ethics and regulations gain importance due to concerns over bias,
misinformation, and security.
• Multimodal AI (handling text, images, and video together) becomes the next
frontier.
• Self-supervised learning and neurosymbolic AI aim to improve explainability and
generalization in AI systems.
Data Science vs Machine Learning
• Data Science and Machine Learning (ML) are closely related fields but
differ in their scope, techniques, and applications.
1. Definition
• Data Science: An interdisciplinary field that focuses on extracting
insights from structured and unstructured data using statistical
analysis, data engineering, and visualization.
• Machine Learning: A subset of artificial intelligence (AI) that enables
systems to learn patterns from data and make predictions or
decisions without explicit programming.
Data Science vs Machine Learning
2. Scope & Focus
Aspect Data Science Machine Learning
Extract meaningful insights and solve Create predictive models that improve performance
Goal
business problems using data. over time.
Involves data collection, cleaning, Involves data collection, cleaning, visualization, and
Approach
visualization, and analysis. analysis.
Fields Statistics, Data Engineering, Business Deep Learning, Neural Networks, Supervised &
Covered Intelligence, Big Data, Machine Learning. Unsupervised Learning.
Data Science vs Machine Learning
3. Techniques & Tools
• Neural networks simulate the way the human brain works, with a huge number of linked processing nodes. Neural networks are good at recognizing patterns and play an important role in applications including natural language translation, image recognition, speech recognition,
and image creation.
• Linear regression
• This algorithm is used to predict numerical values, based on a linear relationship between different values. For example, the technique could be used to predict house prices based on historical data for the area.
• Logistic regression
• This supervised learning algorithm makes predictions for categorical response variables, such as “yes/no” answers to questions. It can be used for applications such as classifying spam and quality control on a production line.
• Clustering
• Using unsupervised learning, clustering algorithms can identify patterns in data so that it can be grouped. Computers can help data scientists by identifying differences between data items that humans have overlooked.
• Decision trees
• Decision trees can be used for both predicting numerical values (regression) and classifying data into categories. Decision trees use a branching sequence of linked decisions that can be represented with a tree diagram. One of the advantages of decision trees is that they are easy
to validate and audit, unlike the black box of the neural network.
• Random forests
• In a random forest, the machine learning algorithm predicts a value or category by combining the results from a number of decision trees.
• Here are just a few examples of machine learning you might encounter every day:
• Speech recognition: It is also known as automatic speech recognition (ASR), computer speech recognition, or speech-to-text, and it is a capability which uses natural language processing (NLP) to translate human speech into a written format. Many mobile devices incorporate
speech recognition into their systems to conduct voice search—e.g. Siri—or improve accessibility for texting.
• Customer service:Online chatbots are replacing human agents along the customer journey, changing the way we think about customer engagement across websites and social media platforms. Chatbots answer frequently asked questions (FAQs) about topics such as shipping, or
provide personalized advice, cross-selling products or suggesting sizes for users. Examples include virtual agents on e-commerce sites; messaging bots, using Slack and Facebook Messenger; and tasks usually done by virtual assistants and voice assistants.
• Computer vision: This AI technology enables computers to derive meaningful information from digital images, videos, and other visual inputs, and then take the appropriate action. Powered by convolutional neural networks, computer vision has applications in photo tagging on
social media, radiology imaging in healthcare, and self-driving cars in the automotive industry.
• Recommendation engines: Using past consumption behavior data, AI algorithms can help to discover data trends that can be used to develop more effective cross-selling strategies. Recommendation engines are used by online retailers to make relevant product
recommendations to customers during the checkout process.
• Robotic process automation (RPA): Also known as software robotics, RPA uses intelligent automation technologies to perform repetitive manual tasks.
• Automated stock trading: Designed to optimize stock portfolios, AI-driven high-frequency trading platforms make thousands or even millions of trades per day without human intervention.
• Fraud detection: Banks and other financial institutions can use machine learning to spot suspicious transactions. Supervised learning can train a model using information about known fraudulent transactions. Anomaly detection can identify transactions that look atypical and
deserve further investigation.
• Selecting a platform can be a challenging process, as the wrong system can drive up costs, or limit the use of other valuable tools or technologies. When reviewing multiple vendors to select an AI platform, there is often a tendency to think that more features = a better system.
Maybe so, but reviewers should start by thinking through what the AI platform will be doing for their organization. What machine learning capabilities need to be delivered and what features are important to accomplish them? One missing feature might doom the usefulness of
an entire system. Here are some features to consider.