Artificial Intelligence (AI) & Machine Learning (ML) Notes
Artificial Intelligence (AI) & Machine Learning (ML) Notes
What is Artificial Intelligence (AI)?
Artificial Intelligence (AI) is the field of computer science that focuses on creating systems capable of performing tasks that normally require human intelligence.
Examples:
- Chatbots
- Self-driving cars
- Recommendation systems
- Voice assistants
- Medical diagnosis systems
AI Overview
Common AI Tasks
| Task | Example |
|---|---|
| Natural Language Processing | ChatGPT |
| Computer Vision | Face Recognition |
| Speech Recognition | Siri, Alexa |
| Recommendation Systems | Netflix, YouTube |
| Robotics | Autonomous Robots |
What is Machine Learning (ML)?
Machine Learning is a subset of AI that allows computers to learn patterns from data without being explicitly programmed.
Instead of writing:
1if email.contains("win money"): 2 spam = True
ML learns automatically:
1Input Data → Training → Model → Prediction
Machine Learning Workflow
AI vs ML
| AI | ML |
|---|---|
| Broad concept | Subset of AI |
| Mimics human intelligence | Learns from data |
| Includes reasoning and planning | Focuses on predictions |
| Example: Robot | Example: Spam Detector |
Relationship
1Artificial Intelligence 2│ 3├── Machine Learning 4│ │ 5│ ├── Deep Learning 6│ │ ├── CNN 7│ │ ├── RNN 8│ │ └── Transformers
Types of Machine Learning
1. Supervised Learning
Uses labeled data.
Example:
1Input: House Features 2Output: House Price
Algorithms:
- Linear Regression
- Logistic Regression
- Random Forest
- XGBoost
Supervised Learning
2. Unsupervised Learning
Uses unlabeled data.
Goal:
- Find hidden patterns
- Group similar data
Algorithms:
- K-Means
- DBSCAN
- PCA
Example:
1Customer Data 2 ↓ 3 Clustering 4 ↓ 5Customer Groups
Unsupervised Learning
3. Reinforcement Learning
Agent learns by rewards and penalties.
Example:
- Chess AI
- Self-driving cars
- Game AI
Reinforcement Learning
Deep Learning
Deep Learning is a subset of ML that uses neural networks with many layers.
1Input Layer 2 ↓ 3Hidden Layers 4 ↓ 5Output Layer
Neural Network Structure
ANN (Artificial Neural Network)
Inspired by the human brain.
ANN Structure
1Input 2 ↓ 3Hidden Layer 4 ↓ 5Output
Use Cases:
- Classification
- Prediction
- Pattern Recognition
CNN (Convolutional Neural Network)
Best for images.
Applications:
- Face Detection
- Medical Imaging
- Object Detection
CNN Visualization
How CNN Works:
1Image 2 ↓ 3Convolution 4 ↓ 5Pooling 6 ↓ 7Fully Connected Layer 8 ↓ 9Prediction
RNN (Recurrent Neural Network)
Designed for sequential data.
Applications:
- Language Translation
- Speech Recognition
- Time Series Forecasting
RNN Visualization
Transformers
Modern architecture powering today's LLMs.
Used in:
- ChatGPT
- Claude
- Gemini
- Translation Systems
Transformer Architecture
Advantages:
- Parallel Processing
- Long Context Understanding
- Better Accuracy
- Scalable Training
Training Process of an AI Model
1Collect Data 2 ↓ 3Clean Data 4 ↓ 5Tokenization 6 ↓ 7Training 8 ↓ 9Validation 10 ↓ 11Testing 12 ↓ 13Deployment
AI Training Pipeline
Popular AI Frameworks
| Framework | Company |
|---|---|
| PyTorch | PyTorch |
| TensorFlow | TensorFlow |
| Keras | Keras |
| Scikit-learn | Scikit-learn |
Real-World AI Applications
Healthcare
- Disease Detection
- Medical Imaging
- Drug Discovery
Finance
- Fraud Detection
- Risk Analysis
- Algorithmic Trading
Education
- Personalized Learning
- AI Tutors
Technology
- Search Engines
- Chatbots
- Virtual Assistants
AI Applications
Quick Summary
1AI 2 └── ML 3 └── Deep Learning 4 ├── ANN 5 ├── CNN 6 ├── RNN 7 └── Transformers
- AI = Making machines intelligent.
- ML = Learning patterns from data.
- Deep Learning = Neural networks with many layers.
- CNN = Best for images.
- RNN = Best for sequences.
- Transformers = Best for modern language models and LLMs.
These notes provide a strong foundation before learning advanced topics such as attention mechanisms, embeddings, tokenization, vector databases, RAG, fine-tuning, LoRA, quantization, and LLM training.