DMU BURIE CAMPUS
Department of Computer Science
Introduction to Machine Learning
By: Mewded Y.
Chapter One
Introduction
23/09/2025 Machine learning by Mewded Y. 2
Content
• What is machine learning(ML)?
• History and relationships to other fields
• Essential math and statistics for machine learning
• Applications of machine learning
• Types of machine learning techniques
23/09/2025 Machine learning by Mewded Y. 3
AI vs ML vs DL
• AI : broader concept
(science+Engineering) to create
intelligent machines that can simulate
human thinking capability.
• ML : subset of AI that allows machines
to learn from data without being
programmed explicitly.
• DL: subset of ML, that uses the neural
networks to analyze different factors with
a structure that is similar to the human
neural system.
23/09/2025 Machine learning by Mewded Y. 4
What is Machine Learning?
• It means that ML is able to perform a
specified task without being directly told how
to do it.
• Example:
• Distinguish between spam and valid email messages.
Given a set of manually labeled good and bad email
examples, an algorithm can automatically learn a set of
rules that distinguish them.
• Language Identification ( Amharic, Ge'ez, Tigrigna,
Afar, etc) ( How?)
• Arthur Samuel (1959) defined machine learning as “a sub-field of computer
science that gives computers the ability to learn without being explicitly
programmed.”
23/09/2025 Machine learning by Mewded Y. 5
What is Machine Learning?
Definition of Machine Learning
• A widely accepted formal definition by Tom Mitchell (1997, professor of Carnegie
Mellon University):
"A computer program is said to learn from experience E with respect to some task T
and some performance measure P if its performance on T, as measured by P,
improves with experience E."
• In simple example, we can reformulate the email spam labeling
• Task (T): What the model is trying to accomplish (email problem as the task of
identifying spam messages).
• Experience (E): Data used for training (using the data of previously labeled email
messages through a machine learning algorithm).
• Performance (P): A way to measure success (e.g., accuracy, error rate with the goal of
improving the future email spam labeling).
23/09/2025 Machine learning by Mewded Y. 6
What is Machine Learning?
• ML aims to select, explore and extract useful knowledge from
complex, often non-linear data, building a computational model
capable of describing unknown patterns or correlations, and in turn,
solve challenging problems.
• This learning process is often carried out through repeated exposure to
the defined problem (training dataset), allowing the model to achieve
self-optimization and continuously enhance its ability to solve new,
previously unseen problems (test dataset).
23/09/2025 Machine learning by Mewded Y. 7
History of Machine Learning
Machine Learning (ML) has evolved significantly over the past few decades. Below is a timeline
of key milestones in its development:
1950s – The Birth of AI and ML
• 1950: Alan Turing proposes the Turing Test, which evaluates a machine's ability to exhibit
intelligent behavior.
• 1951: Marvin Minsky and Dean Edmonds build the first artificial neural network (ANN).
• 1956: The Dartmouth Conference marks the official birth of artificial intelligence (AI), where
ML was recognized as a subfield.
1960s – Early ML Algorithms
• 1967: The nearest neighbor algorithm is developed, laying the foundation for pattern
recognition.
• 1969: Marvin Minsky and Seymour Papert publish Perceptrons, showing the limitations of
single-layer neural networks.
1970s – Rise of Expert Systems
• AI and ML research shifts toward rule-based systems, where knowledge is encoded manually
rather than learned from data.
23/09/2025 Machine learning by Mewded Y. 8
History of Machine Learning
1980s – Resurgence of Neural Networks
• 1986: Geoffrey Hinton and others introduce the backpropagation algorithm, reviving
interest in artificial neural networks.
• 1989: Yann LeCun successfully applies Convolutional Neural Networks (CNNs) to
handwritten digit recognition.
1990s – Machine Learning Becomes a Field of Its Own
• 1995: Support Vector Machines (SVMs) emerge as a powerful classification tool.
• 1997: IBM’s Deep Blue defeats world chess champion Garry Kasparov, demonstrating
AI’s potential.
2000s – Rise of Big Data and Practical ML Applications
• The availability of large datasets (big data) and more powerful computing resources drive
ML adoption.
• 2006: Geoffrey Hinton coins the term Deep Learning, leading to breakthroughs in neural
networks.
23/09/2025 Machine learning by Mewded Y. 9
History of Machine Learning
2010s – Deep Learning Revolution
• 2012: AlexNet (a deep CNN) wins the ImageNet Challenge, showcasing the power of deep
learning.
• 2014: Google’s AlphaGo beats a human champion in the complex game of Go.
• 2017: Transformer models (e.g., BERT, GPT) revolutionize Natural Language Processing
(NLP).
2020s – AI and ML in Everyday Life
• ML powers applications like ChatGPT, autonomous cars, medical diagnosis, and climate
modeling.
• Ethical concerns and AI regulation become major discussion points.
23/09/2025 Machine learning by Mewded Y. 10
Relationships of ML to Other Fields
Machine Learning is an interdisciplinary field that combines knowledge from multiple domains:
Field How It Relates to ML
Artificial Intelligence ML is a subset of AI that focuses on learning from data, while AI includes rule-based systems
(AI) and symbolic reasoning.
Statistics & Probability ML relies on statistical methods for making predictions and analyzing data distributions.
Mathematics Linear algebra, calculus, and optimization techniques are essential for building ML models.
Computer Science ML algorithms are implemented using programming languages like Python, R, and C++.
ML is a key component of data science, which involves extracting insights from structured
Data Science
and unstructured data.
Neuroscience &
Neural networks in ML are inspired by the structure and functioning of the human brain.
Cognitive Science
Operations Research ML is used in decision-making, optimization, and logistics (e.g., supply chain management).
Engineering & Robotics ML helps in designing intelligent robots that can adapt to different environments.
Linguistics & NLP ML models like ChatGPT and Google Translate process and generate human language.
23/09/2025 Machine learning by Mewded Y. 11
Probablity Theory in ML
• Probability is key concept is dealing with uncertainty
• Arises due to finite size of data sets and noise on measurements
• Probability Theory
• Framework for quantification and manipulation of uncertainty
• One of the central foundations of machine learning
23/09/2025 Machine learning by Mewded Y. 12
Basic Concepts on Probablity
• Probability. The word probability is actually undefined, but the
probability of an event can be explained as the proportion of times,
under identical circumstances, that the event can be expected to occur
from the known population.
• It is the event's long-run frequency of occurrence.
• For example, the probability of getting a head on a coin toss = 0.5.
23/09/2025 Machine learning by Mewded Y. 13
Key Terms
• Classical (or theoretical) probability is used when each outcome in a sample space is equally
likely to occur. The classical probability for event E is given by,
P(E) =
Example: Find the probability of rolling a 4 on a fair die.
Answer: There are 6 possible outcomes when rolling a die: 1, 2, 3, 4, 5, and 6. The only favorable
outcome is rolling a 4. = 1/6 ( What do you think about rolling an even number?)
• Empirical (or statistical) probability an event is an estimate that an event will occur based upon
how often the event occurred after collecting data from an experiment in a large number of trials.
This type of probability is based upon direct observations. Each observation in an experiment is
called a trial/total frequency and is given by,
P(E) =
23/09/2025 Machine learning by Mewded Y. 14
Key Terms
• Example
What is the probability of that the students favorite sneaker was not brand A or B?
Simple probability. P(A). The probability that an event (say, A) will occur.
Joint probability. P(A and B). P(A ∩ B). The probability of events A and B occurring
together.
Conditional probability. P(A|B), read "the probability of A given B." The probability that
event A will occur given event B has occurred.
23/09/2025 Machine learning by Mewded Y. 15
Traditional Programming vs ML approach
23/09/2025 Machine learning by Mewded Y. 16
Statistics vs. ML
• Inference: drawing conclusions about something in the text using the text evidence, your own
background knowledge and common sense. Inferences are made about what happened in the past
or what is currently happening.
• Prediction: using the text evidence ,background knowledge and common sense to make a guess to
what will happen in the future.
23/09/2025 Machine learning by Mewded Y. 17
Applications of ML
1. Healthcare • Self-driving cars using ML for object detection
• Disease detection (e.g., cancer diagnosis using and decision-making.
CNNs). • Traffic prediction and congestion management.
• Drug discovery and patient-specific treatment 5. Cybersecurity
plans. • Malware and phishing detection.
2. Finance • AI-powered intrusion detection systems.
• Fraud detection using anomaly detection 6. Social Media & Natural Language Processing
models. (NLP)
• Credit scoring and risk assessment. • Sentiment analysis in social media posts.
3. Retail & E-commerce • Chatbots and virtual assistants (e.g., Siri, Alexa).
• Personalized recommendations (Amazon, 7. Manufacturing & Industry 4.0
Netflix).
• Predictive maintenance of machines.
• Dynamic pricing based on demand forecasting.
• Automated quality control using ML models.
4. Autonomous Vehicles
23/09/2025 Machine learning by Mewded Y. 18
Types of ML Techniques
A. Supervised Learning
• Learn to predict output when given an input vector
• Training data includes desired outputs
• Model learns from labeled data (input-output pairs).
• Used for Classification (e.g., spam detection) and Regression (e.g., price prediction).
Algorithms:
• K-nearest neighbour(KNN)
• Naïve Bayes
• Random Forest
• Linear Regression
• Decision Trees
• Support Vector Machines (SVM)
• Neural Networks
23/09/2025 Machine learning by Mewded Y. 19
Types of ML Techniques
23/09/2025 Machine learning by Mewded Y. 20
Types of ML Techniques
B. Unsupervised Learning
• The aim is to uncover the underlying structures (classes or clusters) in the data
• Training data does not include desired outputs. This is the new frontier of
machine learning because most big datasets do not come with labels.
• The model learns patterns from unlabeled data.
• Used for Clustering (e.g., customer segmentation) and Association Rules
(e.g., product recommendation).
Algorithms:
• K-Means Clustering
• Hierarchical Clustering
• Principal Component Analysis (PCA)
23/09/2025 Machine learning by Mewded Y. 21
Types of ML Techniques
23/09/2025 Machine learning by Mewded Y. 22
Types of ML Techniques
C. Reinforcement Learning
• Model learns by interacting with an environment using rewards and penalties.
• Learning method that interacts with its environment by producing actions and
discovers errors or rewards.
• On the basis of trial and error, to discover what actions maximize reward and
minimize the penalty.
• Used in Robotics, Game-Playing (AlphaGo, OpenAI Gym), and Self-
driving cars.
Algorithms:
• Q-Learning
• Deep Q Networks (DQN)
• Policy Gradient Methods
23/09/2025 Machine learning by Mewded Y. 23
The Learning Problem
• Given <x,f(x)> pairs, infer f
x f(x)
1 1
2 4
3 9
4 16
5 ?
• Given a finite sample, guessing the true function f is often impossible.
• Approach: Find a pattern (called a hypothesis) in the training examples and assume that the pattern
will hold for future examples, too.
• Training: Given a training set of labeled examples {(x1,y1),…, (xN,yN)}, estimate the prediction
function f by minimizing the prediction error on the training set
• Testing: Apply f tonever-before-seen test example x and output the predicted value y = f(x)
23/09/2025 Machine learning by Mewded Y. 24
Learning—A Two-Step Process
• Model construction:
• A training set is used to create the model.
• The model is represented as classification rules, decision trees,
or mathematical formula
• Model usage:
• the test set is used to see how well it works for classifying
future or unknown objects
23/09/2025 Machine learning by Mewded Y. 25
Step1: Model Construction
23/09/2025 Machine learning by Mewded Y. 26
Step 2: Using the Model in Prediction
23/09/2025 Machine learning by Mewded Y. 27
Challenges in ML
• Efficiency and scalability of machine learning algorithms
•Challenge: As data grows (big data), algorithms must be fast and handle more data without slowing down.
•Example: A recommendation system should work just as well for 10 million users as it does for 100.
• Bias in algorithms, privacy issues
• Challenge: ML models can reflect human or data biases, and using personal data may raise ethical or
legal concerns.
• Example: A hiring algorithm trained on biased data may favor certain groups unfairly; using private
medical data without consent can violate privacy.
• Overfitting and underfitting (model generalization problems)
•Overfitting: The Model learns too well from training data (including noise) but fails on new data.
•Underfitting: The Model is too simple to capture the real patterns in the data.
• Handling high-dimensionality
•Challenge: Too many features (dimensions) can confuse models and make them slow.
•Example: A dataset with 1,000+ features may include many that don’t help—this is called the "curse of
dimensionality".
• Data acquisition and representation issues
•Challenge: Getting good-quality, labeled data is often hard and expensive.
•Also: Representing the data in a useful format (e.g., text, images, graphs) is key for good learning.
23/09/2025 Machine learning by Mewded Y. 28
Challenges in ML
• Handling noise, incomplete and imbalanced data
•Noise: Errors or irrelevant data that confuse the model.
•Incomplete Data: Missing values hurt performance.
•Imbalanced Data: One class is overrepresented (e.g., fraud = 1%, non-fraud = 99%), so models may ignore the
rare but important cases.
• Pattern evaluation and knowledge integration
•Challenge: It's hard to tell if patterns the model finds are meaningful or just random.
•Example: A model might find correlations that don’t make sense in the real world.
• Protection of security, integrity, and privacy in machine learning
• ML systems can be attacked (e.g., adversarial examples), and sensitive data can be leaked.
• Degree of interpretability for predictive power
•Challenge: Complex models (like deep neural networks) are often accurate but hard to interpret.
•Tradeoff: Simpler models are easier to understand but may not perform as well.
•Goal: Balance accuracy with explainability.
• ML models can require high computational power
•Challenge: Training large models (especially deep learning) needs powerful hardware (e.g., GPUs/TPUs),
which can be expensive and energy-consuming.
•Example: Training a large language model can cost thousands of dollars in compute.
23/09/2025 Machine learning by Mewded Y. 29
Basic steps in ML
1. Data collection
• “training data”, mostly with “labels” provided by a “teacher”;
2. Data preprocesing
• Clean data to have homogenity
3. Feature engineering
• Select represenatative features to improve performance
4. Modeling
• choose the class of models that can describe the data
5. Estimation/Selection
• find the model that best explains the data: simple and fits well;
6. Validation
• evaluate the learned model and compare to solution found using other model classes;
7. Operation
• Apply learned model to new “test”
23/09/2025
data or real world instances
Machine learning by Mewded Y. 30
Basic Mathematics for Machine learning
Remember the following courses?
• Linear Algebra
• Vectors & Matrices – Used to store and manipulate data (e.g., feature vectors).
• Matrix Operations – Multiplication, addition, transposition, and inversion are used in ML models.
• Probability & Statistics
• Probability Distributions – Gaussian (Normal), Bernoulli, Binomial, and Poisson distributions are
common in ML.
• Bayes’ Theorem – Foundation of Bayesian Machine Learning.
• Hypothesis Testing – Helps in model validation.
• Calculus
• Derivatives & Gradients – Used in optimization algorithms (e.g., Gradient Descent).
• Partial Derivatives – Helps in training neural networks.
• Integrals – Applied in probabilistic models.
Please read the below book:
-Marc Toussaint Maths for Intelligent Systems, 2017.
23/09/2025 Machine learning by Mewded Y. 31
Thank you!
?Questions
23/09/2025 Machine learning by Mewded Y. 32