KEMBAR78
Notes From Training | PDF | Machine Learning | Statistical Classification
0% found this document useful (0 votes)
11 views12 pages

Notes From Training

The document provides an overview of various machine learning techniques, including supervised, unsupervised, and reinforcement learning, along with their workflows and algorithms. It details deep learning concepts, architectures, and specific use cases for different types of neural networks, such as CNNs and RNNs. Additionally, it discusses generative AI models and their applications in natural language processing.

Uploaded by

Muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

Notes From Training

The document provides an overview of various machine learning techniques, including supervised, unsupervised, and reinforcement learning, along with their workflows and algorithms. It details deep learning concepts, architectures, and specific use cases for different types of neural networks, such as CNNs and RNNs. Additionally, it discusses generative AI models and their applications in natural language processing.

Uploaded by

Muhammad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

 Artificial Intelligence

o Machine Learning
 Deep Learning
 Generative AI

- Machine Learning

- Supervised Learning

Type of Labels Algorithms


Classification or Categoric Labels Logistic Regression, decision tree classifier, K-
Nearest, Support Vector Machine
Continuous Labels Linear Regression, Decision Tree, Regressor, K-
Nearest Neighbours Regressor, Neural
Networks (for regression)

- Supervise Learning Workflow

Supervised Learning is split into Regression (continuous) and Classification (categorical) based on
the type of label/output

1- Data Collection
2- Data Preprocessing
3- Model Selection
 Regression -> Linear/Logistic Regression
 Classification -> Decision Tree, SVM, etc.
4- Model Training
5- Model Evaluation
6- Model Tuning (optional)
7- Deployment
8- Prediction

- Un-Supervised Learning
Unsupervised Learning, we group algorithms based on what kind of patterns or structures they
try to uncover in the unlabeled data.

Category Purpose Algorithm Use Case


Clustering Group similar K- Customer
items Means,DBSCA segmentation
N
Dimensionality Simplify data PCA, t-SNE Visualization, noise
Reduction removal
Anomaly Spot outliers Isolation Fraud detection
Detection Forest

- Un-Supervised Learning Flow

o Where there are no labeled outputs.


o Algorithms learn the pattern in data and group similar data items without being told,
what to look for.
o Workflow
1- Prepare the data
2- Create similarity metrics e.g. Cosine, Euclidian, Manhattan etc.
3- Run clustering algorithms. Based on partition, hierarchical, density, distribution
4- Interpret results and adjust clustering. Quality check of clustering output and verify
against expectations iteratively.

- Reinforcement Learning

 Type of ML that enables an agent to learn from its interactions with the environment.
 Does not have any fixed input-output (X  Y) pairs
 It gets reward or penalties
 It learns a policy/strategy over the time

Compon Description
ent
Agent The learner or decision-maker
Environm Where the agent interacts
ent
Action What the agent can do
State Current situation of the environment
Reward Feedback after each action (positive or
negative)
Policy Strategy that the agent learns (what to do in
each state)

Problem Type Example Task Best-Suited RL Algorithms

🟦 Discrete Actions Board games (Chess, Go), Grid- Q-Learning, SARSA, Deep Q-Network
world (DQN)

🟩 Continuous Actions Self-driving cars, Robot arm DDPG, TD3, SAC, PPO
control

🟨 High-Dimensional Atari games, image-based tasks DQN (with CNNs), A3C, PPO,
Input AlphaZero

🟥 Real-Time Control Autonomous drones, walking PPO, TRPO, A3C, Model Predictive
robots Control (MPC)

🟧 Offline Learning Learning from past user logs or Batch RL, Conservative Q-Learning
telemetry (CQL)

🟪 Multi-Agent Multiplayer games, traffic MADDPG, QMIX, Multi-Agent PPO


Environments simulations (MAPPO)

⬛ Exploration-Dominant Sparse rewards (e.g., puzzle RND (Random Network Distillation),


solving) Curiosity-driven RL

🟫 Imitation + RL Teaching cars to drive from human Behavioral Cloning, DAgger + PPO or
input SAC
- Deep Learning

Deep Learning is a subset of Machine Learning that uses neural networks with multiple layers to
automatically learn complex patterns and features from large datasets — especially useful for
images, speech, text, and time series data.

o ML needs us to specify features


o DL extracts feature from raw and complex data
o Internal representation of data is built using extracted features

 Lower layers learn simple things (e.g. edges in an image)


 Higher layers learn complex patterns (e.g. a face)
 This is called hierarchical feature learning

o DL algorithms allow parallel processing of data


o That leads to better scalability and performance

🤖 Suggested Algorithm /
🧩 Problem Type 🎯 Example Use Case
Architecture
Identify cats, cars, or defects in CNN (Convolutional Neural
Image Classification
images Network)
Find and locate cars in traffic
Object Detection YOLO, SSD, Faster R-CNN
cam footage
Image Segmentation Mark tumors in medical scans U-Net, Mask R-CNN
Speech to Text Convert voice to written words Wav2Vec2, Whisper, DeepSpeech
GPT (Generative Pretrained
Text Generation Generate emails, responses
Transformer)
Machine Translation Translate English to Arabic Transformer, MarianMT, mBART
Sentiment Analysis Detect user emotion in reviews RNN, LSTM, BERT
Time Series Predict stock prices, energy
LSTM, GRU, Temporal CNN
Forecasting demand
Face Recognition Unlock phone with face FaceNet, VGGFace, DeepFace
Recommendation Neural Collaborative Filtering,
Suggest products, movies
Systems Autoencoders
Autoencoders, LSTM (sequence-
Anomaly Detection Fraud detection in transactions
based)
Generate text description of an CNN + RNN, Transformer encoder-
Image Captioning
image decoder
Deep Learning Building Blocks

🔷 Layers
Neural networks are made up of layers:
 Input Layer: Receives raw data
 Hidden Layers: Do the main computation
 Output Layer: Produces the final prediction

🟢 Neurons
A neuron is a processing unit that:
 Takes inputs
 Applies weights and bias
 Passes the result through an activation function
 Produces an output

🟠 Weights
A numerical value that represents the importance or strength of an input connection to a
neuron.
 Higher weight = stronger influence on the result

🔘 Activation Function
A mathematical function applied to the neuron’s output to:
 Introduce non-linearity
 Decide whether the neuron should be activated or not
Example: ReLU, Sigmoid, Tanh
 Heavyside step activation function is used for output

🟤 Bias
A constant value added to the input of a neuron to:
 Help the model shift the activation function
 Provide flexibility in learning
Sequence Models:
1- RNN (Recurrent Neural Network)
2- Long Short-Term Memory (keep data in memory)

Feature RNN LSTM


Remembers short-term info Remembers long-term
🔁 Memory
only dependencies
Complex: includes gates
🧮 Structure Simple: just one repeating cell
(forget, input, output)
🔧 Passes hidden state from one Controls memory with gate
Mechanism step to next logic
❌ Struggles with long sequences
Handles long sequences better
Limitation (vanishing gradient)
⚙️Use Simple tasks like basic text Complex sequences: stock
Case prediction forecasting, translation, etc.

The first one is Feedforward Neural Networks, abbreviated as FNN. This is also called as Multilayer
Perceptron as MLP - multilayer perceptron and is the simplest form of neural networks.

Second is CNN, which is Convolutional Neural Network. This can automatically detect and learn local
patterns and features in images and videos.

The third one is RNN, which is a recurrent neural network. RNNs are designed to handle sequential data,
such as time series data or natural language. They have a feedback loop that allows them to maintain
hidden states and capture temporal dependencies.

The fourth one is autoencoders. Autoencoders are unsupervised learning models used for feature
extraction and dimensionality reduction and is commonly employed in data compression and anomaly
detection.

The fifth one is LSTM. That is long short-term memory. LSTM is a specialized RNN variant designed to
handle long-term dependencies in sequential data.

The sixth one is GAN, which is Generative Adversarial Network. This is a powerful, deep learning model,
which is used for generating realistic synthetic data such as images, audio, and text.

And the last one is transformers. Transformers are widely used in natural language processing and have
become state-of-the-art models for tasks like machine translation, text generation, and language
understanding.
🧠 How RNN Works:

At each time step, RNN takes the current input AND the hidden state (which carries info from past
inputs).

So:

 It remembers past inputs

 It uses them together with the current input

 It updates its internal memory (hidden state) accordingly


Convolution Neural Network (CNN) Model:

Example

Let us check the analogy between a robot, house inspector, and different layers of the feature extraction.
Similar to blueprint detector, we have a convolutional layer. This layer applies convolutional operations
to the input image using small filters known as kernels. Each filter slides across the input image to detect
specific features, such as edges, corners, or textures.

Similar to pattern highlighter, we have an activation function. The activation function allows the network
to learn more complex and non-linear relationships in the data. Pooling layer is similar to room
summarizer (reduces image size but keeps key info e.g., fire flare pattern). Pooling helps reduce the
spatial dimensions of the feature maps generated by the convolutional layers. Similar to a house expert,
we have a fully connected layer, which is responsible for making final predictions or classifications based
on the learned features.

Softmax layer converts the output of the last fully connected layers into probability scores. The class with
the highest probability is the predicted class. This is similar to the guessmaker. And finally, we have the
dropout layer. This layer is a regularization technique used to prevent overfitting in the network. This has
the same role as that of a quality checker.
Limitations

CNNs do have some limitations that are important to be aware of.

Training CNNs on large data sets can be computationally expensive and time-consuming.

CNNs are susceptible to overfitting, especially when the training data is limited or imbalanced.

CNNs are considered blackbox models, making it difficult to interpret.

And CNNs can be sensitive to small changes in the input leading to unstable predictions.
Generative AI:

Encoder Only

Feature Details

Architecture Only Encoder blocks

Input Full input sequence

Output Encoded representation (context-rich vectors)

Remembers Chat ❌ No (needs full input every time)


Context?

Example Models BERT, RoBERTa, DistilBERT

Use Cases Sentiment analysis, NER, text classification, embeddings

Decoder Only

Feature Details

Architecture Only Decoder blocks

Input Token-by-token (autoregressive)

Output Predicts next token

Remembers Chat Context? ✅ Yes (naturally remembers past tokens)

Example Models GPT-2, GPT-3, GPT-4, Claude, LLaMA

Use Cases Chatbots, content generation, coding, summarization


Encoder-Decoder

Feature Details

Architecture Encoder + Decoder

Encoder Input Full source sequence

Decoder Output Generates target sequence token-by-token

Remembers Chat ❌ No (each input must contain full context)


Context?

Example Models T5, BART, MarianMT

Use Cases Translation, summarization, question answering, text-to-text tasks

You might also like