Machine Learning
Introduction to Machine Learning
Machine Learning (ML) is a branch of Artificial Intelligence that enables systems to learn from data and improve performance without being explicitly programmed.
Definition: Machine Learning is the study of algorithms that improve automatically through experience.
Why Machine Learning?
- Handles large volumes of data
- Learns patterns automatically
- Supports prediction and decision-making
ML vs Traditional Programming
| Traditional Programming | Machine Learning |
|---|---|
| Rules + Data → Output | Data + Output → Rules |
Types of Machine Learning
(a) Supervised Learning
- Learning with labeled data
- Input-output pairs are known
Examples: Classification, Regression
(b) Unsupervised Learning
- Learning with unlabeled data
- Finds hidden patterns
Examples: Clustering, Association
(c) Reinforcement Learning
- Learning through rewards and penalties
- Agent interacts with environment
Types Summary Table
| Type | Data | Example |
|---|---|---|
| Supervised | Labeled | Spam detection |
| Unsupervised | Unlabeled | Customer segmentation |
| Reinforcement | Feedback | Game playing |
Application Areas of Machine Learning
| Area | Application |
|---|---|
| Healthcare | Disease prediction |
| Finance | Fraud detection |
| Marketing | Recommendation systems |
| NLP | Language translation |
| Robotics | Autonomous control |
Decision Trees
A Decision Tree is a tree-structured model used for classification and regression.
Components
| Component | Description |
|---|---|
| Root Node | Top decision point |
| Internal Node | Condition test |
| Leaf Node | Output decision |
Simple Decision Tree Diagram
Age?
/ \
Young Old
| |
Yes No
Advantages & Disadvantages
| Advantages | Disadvantages |
|---|---|
| Easy to understand | Overfitting |
| No data normalization | Sensitive to noise |
Statistical Learning Methods
Statistical learning uses probability and statistics to model relationships in data.
Common Methods
| Method | Use |
|---|---|
| Linear Regression | Prediction |
| Logistic Regression | Classification |
| k-Nearest Neighbor | Similarity-based |
| Support Vector Machine | Margin-based |
Learning with Complete Data
Learning with complete data means all variables and labels are fully observed.
Characteristics
- No missing values
- Direct probability estimation
- Easier model training
Naïve Bayes Model
Naïve Bayes is a probabilistic classifier based on Bayes’ theorem.
Bayes’ Theorem
P(C|X) = (P(X|C)P(C)) / P(X)
Assumption
Features are conditionally independent
Example: Spam classification using word probabilities
Advantages & Limitations
| Advantages | Limitations |
|---|---|
| Fast & simple | Independence assumption |
| Works with small data | Lower accuracy sometimes |
Learning with Hidden Data
Hidden data refers to unobserved or missing variables during learning.
Challenges
- Incomplete information
- Indirect observation
Example
- Hidden customer intent
- Hidden system states
EM Algorithm (Expectation–Maximization)
EM algorithm is used to learn parameters when data is incomplete or hidden.
Steps of EM Algorithm
| Step | Description |
|---|---|
| E-Step | Estimate missing data |
| M-Step | Maximize likelihood |
EM Flow Diagram
Initial Guess
↓
E-Step
↓
M-Step
↓
Converge
Applications
- Clustering
- HMM training
- Missing data problems
Reinforcement Learning
Reinforcement Learning (RL) is a learning method where an agent learns by interacting with environment.
Key Elements
| Element | Description |
|---|---|
| Agent | Learner |
| Environment | World |
| Action | Decision |
| Reward | Feedback |
| Policy | Strategy |
Reinforcement Learning Diagram
Agent → Action → Environment
↑ ↓
Reward ← State ←——
Applications
- Robotics
- Game AI
- Self-driving cars
Comparison Summary
| Learning Type | Data Type | Example |
|---|---|---|
| Supervised | Complete | Naïve Bayes |
| Unsupervised | Hidden | EM Algorithm |
| Reinforcement | Feedback | Q-learning |
MCA Exam-Oriented Tips
- Write Bayes’ theorem clearly
- Draw EM and RL diagrams
- Compare supervised vs reinforcement learning
- Explain assumptions of Naïve Bayes
- Use tables for advantages & disadvantages
End of Notes