BCS602 Module 1
BCS602 Module 1
MACHINE LEARNING
Module-1
Chapter – 01 – Introduction
o Earlier, the potential of this data was not utilized due to scattered data sources and lack of
integration tools.
Companies like Facebook, Twitter, and YouTube generate enormous data, which doubles
approximately every year.
Declining hardware and storage costs make it easier to capture, store, process, and
distribute digital data.
Knowledge Pyramid:
o Information: Processed data revealing patterns or relationships, e.g., identifying the best-selling
product from sales data.
o Wisdom: The ultimate objective, representing the maturity of human decision- making, which
machine learning helps organizations to approach.
BCS602 (Machine Learning)
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."
Conventional Programming:
Limitations:
o Early AI relied on expert systems that converted expert knowledge into rules (e.g., MYCIN for
medical diagnosis), but these lacked true intelligence.
o Uses input data to develop models that can predict unknown data.
o Forms of models:
1. Mathematical equations.
Clusters (groupings).
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:
o Performance (P): Metrics like precision and recall measure detection accuracy.
2. Abstraction: Forming abstract concepts from data (e.g., recognizing an elephant’s features).
3. Generalization:
4. Evaluation:
Human Analogy:
o When faced with new problems, humans apply past experiences and heuristics.
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.
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.
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
fields under data science include:
BCS602 (Machine Learning)
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.
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 viewed
as an evolved version of "old statistics."
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.
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.
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.
Algorithms:
Decision Trees
Random Forest
Naïve Bayes
Classification models:
BCS602 (Machine Learning)
Regression:
Algorithm:
Linear Regression: Fits a line (e.g., y=0.66x+0.54y = 0.66x + 0.54y=0.66x+0.54) to predict outcomes
based on independent variables.
Unsupervised Learning
Methods:
Cluster Analysis:
Example:
Algorithms:
k-means algorithm
Hierarchical algorithms
Dimensionality Reduction:
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:
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:
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:
Actions: Choices available to the agent (e.g., move left, right, up, down in a grid game).
The agent learns to navigate from the bottom-left grid to the goal by exploring various paths and gaining
rewards for successful actions or penalties for poor decisions.
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.
Reward-driven learning: Positive rewards reinforce desirable behavior, while negative rewards
discourage it.
Machine learning, while powerful, faces several challenges that stem from its reliance on data quality,
computational resources, and algorithmic efficiency.
Machine learning performs well on well-posed problems, where specifications are complete, clear, and
well-defined.
o Solution: Ill-posed problems require more comprehensive data, better- defined objectives, or
external constraints to improve their solvability.
Quality of Data
o Imbalanced Data: Datasets where certain classes are underrepresented lead to poor performance
for those classes.
Solution: High-quality preprocessing, data augmentation, and imputation techniques can address
these issues.
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
BCS602 (Machine Learning)
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).
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
BCS602 (Machine Learning)
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.
The CRISP-DM (Cross-Industry Standard Process for Data Mining) methodology provides a
structured framework for building data mining and machine learning solutions.
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:
o Choose a data mining or machine learning algorithm that aligns with the business goals.
Objective: Explore and understand the data available for solving the problem.
BCS602 (Machine Learning)
Activities:
o Formulate hypotheses based on the data and match patterns to the hypotheses.
Data Preparation
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.
Deployment
Activities:
BCS602 (Machine Learning)
Machine learning is transforming various industries and is increasingly present in everyday life.
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:
Voice Assistants
Use Case: Use speech recognition and natural language understanding to perform tasks.
Examples: Amazon Alexa, Apple Siri, Google Assistant, Microsoft Cortana. Navigation
Systems
Use Case: Optimize routes and reduce travel time using machine learning-based algorithms.
Big
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)
BCS602 (Machine Learning)