0% found this document useful (0 votes)
4 views2 pages

DL Insem Final

The document discusses Machine Learning (ML) and Deep Learning (DL), detailing their definitions, limitations, and advantages. It explains the architecture of DL, including layers, activation functions, and training methods like forward and backpropagation. Additionally, it covers various applications of DL, loss functions, and tools like TensorFlow and PyTorch.

Uploaded by

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

DL Insem Final

The document discusses Machine Learning (ML) and Deep Learning (DL), detailing their definitions, limitations, and advantages. It explains the architecture of DL, including layers, activation functions, and training methods like forward and backpropagation. Additionally, it covers various applications of DL, loss functions, and tools like TensorFlow and PyTorch.

Uploaded by

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

Q1) What is ML & its limitations DL Unit 1 Q4) What is Deep Learning, Pros and Cons:- DL is subset of ML that

) What is Deep Learning, Pros and Cons:- DL is subset of ML that uses RNN with multiple layer to
ML is branch of AI that enables computers to learn from data and make decision without being learn from large amount of data. This network mimic the human brain structure and function, allowing
explicitly programmed. Instead of following fixed set of instruction, ML models recognise pattern in machine to improve recognising patterns, make decision and improve performance over time.
data and improve their performance overtime. Limitations- 1)Requires large amount of data- ML Pros:- 1)High Accuracy- DL model achieves high accuracy in tools like image recognition, speech
perform well only when trained on vast amount of high-quality data. If dataset is small, model may not processing. 2)Automatic Feature Extraction- Unlike traditional ML, DL can automatically learn
generalize well. 2)Computational expensive- Training ML model, especially DL model requires important feature without human intervention. 3)Handle complex problems- It console, highly
powerful hardware like GPUs and TPUs. 3)Overfitting & Underfitting- Overfitting means model learns complex task like self driving cars, AI assisted. 4)Scalability- Handle Large datasets.
too much from training data, including noise & perform poorly on new data. Underfitting means model Cons:- 1) Requires Large Datasets- DL models perform well only when trend on massive data sets.
is too simple & fails to capture important pattern in data. 4)Requires Domain Expertise- Choosing the Small datasets may lead to poor result. 2)High computational cost- Training deep models requires
right ML algorithm, preprocessing data domain knowledge. Without expertise, model may not perform powerful GPUs / TPU making it expensive. 3)Long Training Time- Training deep models can take hours
well or could lead to misleading result. 5)Security and privacy concerns- ML modes can be vulnerable depending on complexity. 4)Requires Expertise- Specialised knowledge of neural network required.
to adversarial attacks, where small change in input data cause wrong prediction.
Q5) Industrial tools used for DL:- 1)TensorFlow- Developed by Google, and is one of most powerful
Q2)Working of Deep Learning with example. Also explain common Architecture principles of DL and widely used DL framework. It provide flexibility for building and training deep neural networks
DL works by using Artificial Neural Network (ANN) with multiple layers to learn pattern from data. using both CPUs & GPUs. Due to its scalability and support for various platform, it is widely used in
i)Layer 1- Input Layer:- This receives input data. DL requires large amount of data (eg- images, text/ industries like healthcare, finance, and automation. 2)PyTorch- It developed by Facebook & is popular
numerical values ). ii)Hidden Layers- Neural network consist of multiple hidden layers, each DL Library known for its flexibility & easy of use. It provides dynamic computation graphs, making
responsible for detecting specific feature. For eg, the first layer detect edges, second layer detect debugging and model development more intuitive. PyTorch is widely used in research and has strong
texture or small shapes. Then third layer combines this feature to recognise object. iii)Output Layer- GPU support. 3)Keras- Keras is high-level DL API that runs on top of tensor flow. It is designed to be
After processing through the layer, the output layer generates a prediction ( eg- identifying cat in simpler and user-friendly, making it ideal for beginner and rapid prototyping. With Keras, developers
image, translating text or recognising speech). Example:- Imagine a DL model to recognise can quickly build and train DL models without needing to write complex code. 4)OpenCV- Open Source
handwritten digits (0-9) from images:- The input layer takes pixel value from images. Hidden layer, Computer Vision library is mainly used for computer vision task, but also support DL integration. It is
extract features like edges curves, and pattern. Output layer classifies digit ( eg, “This image is 7”). widely used in real time, applications like face, recognition, object detection and video analysis.
Common Architecture principles of DL- 1)Layered Structure- Deep network, a multiple layers and
Q6)Bias, Variance & Trade-off:-
input layer, several hidden layer and an output layer. 2)Activation Functions- Functions like ReLU,
1)Bias- Refers to the error due to incorrect assumption in the model. Model with high bias is too
Sigmoid & Tanh hell introduce nonlinearity allow model to learn complex pattern. 3)Weights & Biases-
simple and cannot capture underlying pattern in data. Eg, a linear regression model trying to predict a
Each neuron in deep Network has weights (Importance of object) and biases (Adjustments for better
complex pattern will have high bias because it assumes relationship is only linear.
learning). 4)Loss Function & optimisation- Loss function major, how far the models predictions are
2) Variance- Refers to model’s sensitivity to small changes in training data. Model with high variance
from actual value. Gradient Descent & optimizers like Adam, SGB help minimise this loss.
learns the training data too well including noise & random fluctuation, leading to overfitting. Eg- deep
5)Regularization & Dropout- To prevent over fitting techniques like dropout (randomly, ignoring some
neural network with too many layers, memorising training data instead of learning general patterns.
neurons during training ) and L2 regularisation are used.
3)Bias- Variance Trade-off- It means we need to find the right balance between bias (simplicity) and
Q3) Short note on Underfitting & Overfitting Regularization variance (complexity) to get best model performance. High bias, low variance- Means that model is
Underfitting- Happens when model is too simple to learn patterns from data. This leads to poor too simple and makes consistent error, leading to underfitting. Low bias, high variance- Means that
performance on both training and test data. Underfitting can be happened due to- i)Using too few model is to complex and memorise data instead of generalising leading to overfitting.
hidden layers or neurons in a DL model. ii)Choosing very high learning rate, causing model to skip
Q7)Real life Applications of DL- 1)Self driving car- DL helps autonomous vehicle, detect object,
learning important patterns. To fix underfitting, we can increase model complexity by adding more
recognise traffic signs, make driving decisions. CNNs process camera image to identify pedestrians,
layers, neurons or training for longer time.
cars & RNNs analyse sensor data for route planning. 2)Medical Diagnosis & Healthcare- DL is
Overfitting- Occurs when a model memorises the training data instead of learning general patterns.
transforming healthcare by helping doctors diagnose diseases early. CNNs analyse medical images like
This means it perform well on training data, but poorly on new, unseen data. It happens when- i)Model
X-rays, MRIs & CT scan to detect disease like cancer, pneumonia. 3) Voice Assistants & speech
is too complex. ii)Model transfer too long learning unnecessary details in data. Overfitting is common
recognition- Voice assistants like Siri & Alexa use DL to understand & process human speech. NLP
problem in DL, but regularization technique help reduce it.
models enable this assistant to recognise voice, translate language and generate human like
Regularization- Prevents over by Simplifying model. Technique used:- 1)Dropout- Some neurons are
responses. 4)Fraud Detection in Finance- Banks use DL to detect fraudulent transaction. RNNs analyse
randomly ignored. 2)L1 & L2 regularization- Add penalties to large weight in model. Prevent from
conjunction patterns, and flag unusual activities, such as credit card fraud or identity theft.
becoming too complex. 3)Early stopping- Stops training when validation accuracy starts decreasing.
5)Agricultural- Crop monitoring, automated harvesting. 6)Retail- Recommendation systems.
Q1)What is Perceptron? Steps involved for training a Perceptron in DL. DL Unit 2 Q6)Loss Functions. Enlist & explain them.
Perceptron is simplest type of artificial neural network, primarily used for binary classification ( 0 or 1). A loss function measures how far a neural network’s prediction is from the actual output. It helps the
Consists of input nodes, weighted connections, a bias term, an activation function & output. model adjust weights during training to minimize errors.
#Steps for Training a Perceptron- 1)Initialize Weights & Bias- Set them to small random values. #Types of Loss Functions in DL- i)Mean Squared Error (MSE). ii)Mean Absolute Error (MAE). iii)Binary
2)Compute Weighted Sum- Multiply inputs by weights, add bias. 3)Apply Activation Function- Use a Cross-Entropy. iv)Categorical Cross-Entropy. v)Huber Loss. vi)Hinge Loss.
step function to determine output. 4)Calculate Error- Compare predicted output with actual label. # 1)Mean Squared Error (MSE)- Used for regression problems. MSE calculates average of squared
5)Update Weights & Bias- Adjust using the Perceptron Learning Rule: 𝑤=𝑤+Δ𝑤, where Δ𝑤=𝜂(𝑦 true difference between actual & predicted value. Formula: MSE = 1/ 2 ∑ ( Y actual - Y predicted )2 .
−𝑦pred)𝑥. (η = learning rate). 6)Repeat Until Convergence- Iterate over the dataset until error is Pros: Penalizes large errors, smooth gradient. Cons: Sensitive to outliers.
minimized. 2)Binary Cross-Entropy- Used for binary classification problems. Measures how different predicted
probabilities are actual labels ( 0 or 1 ). Formula: BCE= - 1/ n ∑ [ y log (p) + (1−y) log (1−p) ].
Q2)Multilayer Feed-Forward Network (MLFN).
Pros: Good for probabilistic predictions. Cons: Requires well-calibrated probabilities.
MLFN is a type of Artificial neural network (ANN) with multiple layer of neurons. Learn complex
pattern from data. Multilayer network has multiple layers, making it more powerful.
Q7) Hyper parameters used in Neural Network.
# 3 Layers:- 1) Input Layer- Receives data. 2)Hidden Layers- Process data using activation functions
Hyperparameters are settings that control how neural network learns. They are not learned from data,
(e.g., ReLU, Sigmoid). 3)Output Layer- Produces the final prediction. #Forward Propagation: Data
but are set before training. #Common Hyperparameters:- 1)Learning Rate (η)- Controls how much
flows only forward through layers. #Used for: Complex problems (e.g., image recognition, NLP).
weights are updated during training. Too high → Unstable learning; Too low → Slow convergence.
Q3)How Neural Networks can be trained with Back & Forward propagation methods. 2)Batch Size- Number of training samples processed before updating weights. Small batch → Noisy
# Forward Propagation- 1)Input data is passed through the network. 2)Each neuron computes the updates, Large batch → More stable but slow. 3)Number of Epochs- One full pass of training data
weighted sum: z=∑(w⋅x)+ bias. 3)Activation function (ReLU, Sigmoid, etc.) is applied. 4)The final output through the network. Too many epochs → Overfitting; Too few → Underfitting.
is generated. # Backpropagation- 1)Calculate error- Difference between predicted & actual output. 4)Number of Layers & Neurons- More layers/neurons → Higher complexity, better learning.
2)Compute gradient of the error w.r.t. weights using chain rule. 3)Update weights using Gradient 5)Dropout Rate- Prevents overfitting by randomly disabling neurons during training.
Descent: w=w−η⋅ ∂w/∂E. (η = learning rate). 4)Repeat until error is minimized. 6)Activation Functions- Determines neuron output (e.g., ReLU, Sigmoid, SoftMax).
Q4) Forward Propagation vs Back Propagation. 7)Optimizer (SGD, Adam, RMSprop)- Algorithm that adjusts weights based on loss function.
#Forward Propagation- 1)It computes output from input. 2)Moves forward through layers.
3)Computes weighted sum & activation function. 4)It Produces final prediction. 5)No weight change. Q8)Sentiment Analysis & its types.
6)One-pass feed-forward. It is an NLP technique that determines the emotional tone in text. It classifies opinions as positive,
#Back Propagation- 1)It adjusts weights to reduce error. 2)Moves backward from output to input. negative, or neutral and is widely used for customer feedback, social media analysis.
3)Computes error calculation & gradient computation. 4)It Minimizes error using gradient descent. #Types of Sentiment Analysis- 1)Binary Sentiment Analysis: Classifies text into positive or negative.
5)Updates weights based on error. 6)Iterative learning process. 2)Multiclass Sentiment Analysis: Includes categories like positive, negative, neutral.
3)Fine-Grained Sentiment Analysis: Provides ratings (e.g., very positive, positive, neutral, negative,
Q5)What is Activation Functions. Enlist and Explain different Activation functions. very negative). 4)Aspect-Based Sentiment Analysis: Analyses sentiment towards specific aspects (e.g.,
It helps neural network decide neuron should be activated to make prediction. They introduce non- "battery life is good, but the camera is bad"). 5)Emotion Detection: Identifies emotions like joy, anger,
linearity allowing network to learn complex patterns. sadness, etc. #Working- 1)Data collection. 2)Preprocessing. 3)Feature Extraction. 4)Classification.
#Some Functions are:- i)Sigmoid, ii)Tanh (Hyperbolic Tangent), iii)ReLU (Rectified Linear Unit), #Application- i)Social media monitoring. ii)Customer feedback analysis. iii)Stock Market Prediction.
iv)Leaky ReLU, v)SoftMax, vi)ELU (Exponential Linear Unit).
1) Sigmoid Function- Maps input values between 0 & 1, making it useful for binary classification Q9)PyTorch and Google Colab.
problem. Formula: f(x)= 1/ 1+ e-x. Output range- (0,1). Pros- Useful for probability-based outputs. Cons- 1)PyTorch: i)It is an open-source deep learning framework developed by Facebook. ii)It provides a
Causes vanishing gradient problem, slowing training. flexible and easy-to-use interface for building and training neural networks. iii)Supports dynamic
2)ReLU (Rectified Linear Unit): The ReLU function is most widely used activation function in DL. It sets computation graphs, making debugging easier. iv)Used in applications like computer vision, NLP, and
negative values to 0 & keeps positive values as they are. Formula: f(x)=max(0,x). Output range- (0, ∞). reinforcement learning.
Pros: Solves vanishing gradient, speeds up training. Cons: Can cause dead neurons. 2)Google Colab- i)Google Colab (Colaboratory) is a cloud-based Jupyter Notebook service. ii)Provides
3) Tanh (Hyperbolic Tangent)- Scales input between (-1,1). Formula- f(x)= ex – e-x / ex + e-x. free access to GPUs and TPUs for deep learning tasks. iii)Supports Python, TensorFlow, PyTorch, and
Pros: Centered around zero, better than Sigmoid. Cons: Still suffers from vanishing gradient. other ML libraries. iv)Ideal for collaborative coding, running large models, and sharing research.

You might also like