Module 1
Module 1
VI Semester
2022 Scheme
RV Institute of Technology and Management®
_________________________________________________________________________________
Module-1
Chapter – 01 - Introduction
Knowledge Pyramid:
_________________________________________________________________________________
o Machine learning helps businesses process large amounts of data to make informed
decisions.
o It aids in designing new products, improving business processes, and developing
effective decision support systems.
_________________________________________________________________________________
Arthur Samuel's Definition: "Machine learning gives computers the ability to learn
without being explicitly programmed."
Focus: Systems learn autonomously by analyzing data without manual
programming.
Conventional Programming:
Limitations:
o Forms of models:
1. Mathematical equations.
2. Relational diagrams (e.g., trees, graphs).
3. Logical rules (if/else).
4. Clusters (groupings).
Page 4
RV Institute of Technology and Management®
_________________________________________________________________________________
Example: A model predicting whether an email is spam or not is derived automatically from
data.
“A computer program learns from experience E, with respect to task T, and performance
measure P, if its performance on T measured by P improves with experience E.”
Example:
Page 5
RV Institute of Technology and Management®
_________________________________________________________________________________
Human Analogy:
Machine Analogy:
o Machines "learn" from data, generalize patterns, and form rules (heuristics) to solve tasks.
Goal: Learn the function f from data to accurately predict outcomes for new inputs.
Page 6
RV Institute of Technology and Management®
_________________________________________________________________________________
Limitations of Heuristics:
Machine learning is a sub-branch of AI, which aims to develop intelligent agents (e.g., robots,
humans, or autonomous systems).
AI originally focused on logic and reasoning but evolved into data-driven systems for finding
relationships in data.
Machine learning focuses on extracting patterns for prediction, while deep learning, a sub-
branch of machine learning, uses neural networks modeled on human neurons.
Page 7
RV Institute of Technology and Management®
_________________________________________________________________________________
Data science is an umbrella term encompassing multiple fields, including machine learning.
Machine learning starts with data and focuses on analyzing patterns for prediction. Some Key
Data Mining: Unearths hidden patterns in data (similar to machine learning but focuses on
pattern discovery).
Data Analytics: Extracts useful knowledge from raw data. Predictive data analytics is closely
related to machine learning.
Page 8
RV Institute of Technology and Management®
_________________________________________________________________________________
Pattern Recognition:
An engineering field that uses machine learning algorithms for feature extraction, pattern
analysis, and classification.
Statistics:
Requires a strong theoretical background and often involves complex equations and assumptions.
Machine Learning:
Less assumption-heavy compared to statistics and automates the learning process. Often
Difference: Statistics aims to validate hypotheses, while machine learning focuses on predictions
and automation.
Machine learning bridges AI, data science, statistics, and pattern recognition. Deep
learning, big data, and data analytics significantly influence its development.
Machine learning simplifies traditional statistical processes while enhancing predictive power.
Page 9
RV Institute of Technology and Management®
_________________________________________________________________________________
Machine learning involves learning through the interaction of a program with its environment.
The types of learning are categorized based on the data used and the supervision provided
during the learning process.
Labelled Data:
Page 10
RV Institute of Technology and Management®
_________________________________________________________________________________
For example, the Iris dataset includes features (e.g., sepal length, petal width) with a target
label (class of Iris flower).
Unlabelled Data:
Supervised Learning
Involves a teacher or supervisor providing labelled data for training and testing.
Page 11
RV Institute of Technology and Management®
_________________________________________________________________________________
Algorithms:
Decision Trees
Random Forest
Support Vector Machines (SVM)
Naïve Bayes
Artificial Neural Networks (e.g., CNNs for deep learning)
Classification models:
Page 12
RV Institute of Technology and Management®
_________________________________________________________________________________
Regression:
Algorithm:
Unsupervised Learning
Page 13
RV Institute of Technology and Management®
_________________________________________________________________________________
Methods:
Cluster Analysis:
Algorithms:
k-means algorithm
Hierarchical algorithms
Dimensionality Reduction:
Page 14
RV Institute of Technology and Management®
_________________________________________________________________________________
Semi-Supervised Learning
Combines labelled and unlabelled data, leveraging small labelled datasets and larger unlabelled
datasets.
Dimensionality Reduction
The goal is to simplify the dataset by reducing the number of features without losing its essential
information.
Applications:
Page 15
RV Institute of Technology and Management®
_________________________________________________________________________________
Reducing computational complexity for machine learning models.
Principal Component Analysis (PCA): Projects data into components that explain the
maximum variance.
Linear Discriminant Analysis (LDA): Finds the linear combinations of features that best
separate classes.
Semi-Supervised Learning
Semi-supervised learning operates in scenarios where a large portion of the dataset is unlabelled,
and only a small portion is labelled.
Since labelling data is expensive and time-consuming, semi-supervised algorithms make use of
unlabelled data by assigning pseudo-labels (predicted labels).
Process:
The pseudo-labelled data is combined with the labelled data to train the model.
Applications:
Page 16
RV Institute of Technology and Management®
_________________________________________________________________________________
Image recognition (with limited labelled samples).
Reinforcement Learning
Reinforcement learning is inspired by how humans learn through interaction and feedback.
An agent interacts with the environment, perceives its state, takes actions, and receives rewards
or penalties.
The agent aims to maximize cumulative rewards by learning the best actions to take over
time.
Key Concepts:
Page 17
RV Institute of Technology and Management®
_________________________________________________________________________________
No labelled data: The agent learns through interaction instead of relying on labelled datasets.
Sequential decision-making: The agent must take multiple steps to achieve the goal.
Machine learning, while powerful, faces several challenges that stem from its reliance on data
quality, computational resources, and algorithmic efficiency.
Page 18
RV Institute of Technology and Management®
_________________________________________________________________________________
Machine learning performs well on well-posed problems, where specifications are complete,
clear, and well-defined.
Quality of Data
Page 19
RV Institute of Technology and Management®
_________________________________________________________________________________
o Imbalanced Data: Datasets where certain classes are underrepresented lead to poor
performance for those classes.
The growth of Big Data and complex machine learning tasks (e.g., deep learning) demands
significant computational resources:
Hardware Requirements: Systems need GPUs, TPUs, or distributed computing for faster
processing.
Time Complexity: Training sophisticated models can take hours, days, or even weeks.
Solution: Leveraging cloud computing platforms, distributed training, and optimized frameworks
(e.g., TensorFlow, PyTorch) can mitigate computational bottlenecks.
Algorithmic Complexity
Page 20
RV Institute of Technology and Management®
_________________________________________________________________________________
Bias/Variance Tradeoff
Bias: Occurs when the model oversimplifies the problem, leading to underfitting.
Variance: Occurs when the model overfits the training data, failing to generalize to new
data.
Striking the right balance between bias and variance—called the bias-variance tradeoff—is
a persistent challenge.
Solution:
Ensemble methods like bagging (e.g., Random Forests) and boosting (e.g., XGBoost) improve
generalization.
Many machine learning models, particularly deep learning, are considered black boxes,
making it difficult to explain their predictions or decisions.
Solution:
Employ explainability tools like SHAP (SHapley Additive exPlanations) or LIME (Local
Interpretable Model-agnostic Explanations).
Page 21
RV Institute of Technology and Management®
_________________________________________________________________________________
Biases present in training data can lead to biased models, perpetuating unfair decisions (e.g.,
in hiring, lending, or law enforcement).
Solution: Implement fairness-aware machine learning techniques, conduct audits, and use
diverse datasets.
Scalability
Scaling machine learning models to work with massive datasets across distributed systems is
a technical challenge.
Solution: Use scalable tools and frameworks like Apache Spark, Dask, or cloud-based machine
learning services.
Page 22
RV Institute of Technology and Management®
_________________________________________________________________________________
It is widely adopted because of its versatility across industries. Below are the six steps of the
CRISP-DM process:
Objective: Grasp the business goals and define the problem statement.
Activities:
Objective: Explore and understand the data available for solving the problem.
Activities:
Data Preparation
Page 23
RV Institute of Technology and Management®
_________________________________________________________________________________
Activities:
Importance: Data quality directly impacts the performance of the machine learning model.
Modeling
Activities:
Evaluation
Objective: Assess the performance of the model using statistical and visualization techniques.
Activities:
Challenges: Tasks like email classification may require expert domain knowledge for proper
evaluation.
Page 24
RV Institute of Technology and Management®
_________________________________________________________________________________
Deployment
Activities:
Sentiment Analysis
Use Case: Natural Language Processing (NLP) techniques analyze text to determine
sentiments (e.g., happy, sad, angry).
Example: Movie and product reviews can be analyzed to assign ratings (e.g., stars) automatically.
Recommendation Systems
Use Case: Personalizes user experiences by suggesting items based on preferences. Example:
Page 25
RV Institute of Technology and Management®
_________________________________________________________________________________
Voice Assistants
Use Case: Use speech recognition and natural language understanding to perform tasks.
Navigation Systems
Use Case: Optimize routes and reduce travel time using machine learning-based
algorithms.
Page 26
RV Institute of Technology and Management®
_________________________________________________________________________________
Page 27
_________________________________________________________________________________
Page 28
_________________________________________________________________________________
Page 29
_________________________________________________________________________________
Page 30
_________________________________________________________________________________
Page 31
_________________________________________________________________________________
Page 32
_________________________________________________________________________________
Page 33
_________________________________________________________________________________
Page 34
_________________________________________________________________________________
Page 35
_________________________________________________________________________________
Page 36
_________________________________________________________________________________
Page 37
_________________________________________________________________________________
Page 38
_________________________________________________________________________________
Page 39
_________________________________________________________________________________
Page 40
_________________________________________________________________________________
Page 41
_________________________________________________________________________________
Page 42
_________________________________________________________________________________
Page 43
_________________________________________________________________________________