sc module 2
sc module 2
A Neural Network (NN) is a computational model inspired by the human brain. It consists of interconnected nodes
(neurons) arranged in layers that process input data, learn patterns, and make predictions or decisions. Neural
networks are the backbone of deep learning and a subset of machine learning.
🔹 Structure / Components:
2. Hidden Layers: Intermediate layers where computations happen using weights and activation functions.
3. Output Layer: Produces the final result (e.g., class label, value).
4. Neurons: Units that receive input, apply transformation, and pass output to the next layer.
7. Activation Function: Decides whether a neuron should be activated or not (e.g., ReLU, Sigmoid).
1. Forward Propagation: Input passes through layers, weighted sums are calculated, activation functions
applied, and an output is generated.
2. Loss Calculation: The difference between predicted output and actual output is measured using a loss
function.
3. Backpropagation: The error is propagated back to adjust weights and biases using optimization (usually
Gradient Descent).
4. Training: This process repeats over many iterations (epochs) to minimize error and improve accuracy.
Pattern recognition
Feature extraction
1. Feedforward Neural Network (FNN) – Basic architecture where data flows in one direction.
2. Convolutional Neural Network (CNN) – Used for image and video processing.
3. Recurrent Neural Network (RNN) – Handles sequence data like time-series, speech, or text.
🔹 Applications:
Outperform traditional algorithms in tasks involving unstructured data (images, text, audio).
🔹 Advantages:
🔹 Disadvantages:
Definition
Modern neuroscience is the scientific field that studies how the brain and nervous system function. It explores how
neurons communicate, process information, and control cognitive functions like memory, learning, decision-making,
and emotions.
Functions
Explains how electrical and chemical signals transmit information across neurons.
Studies brain functions like perception, motor control, and language processing.
Applications
Importance
Serves as a foundation for building intelligent systems that mimic the brain.
Definition
Classical AI, also known as symbolic AI, is a rule-based approach where intelligence is achieved through logic,
reasoning, and manipulation of symbols. It uses predefined rules and knowledge bases to simulate intelligent
behavior.
Functions
Employs search techniques and heuristics for navigation and optimization tasks.
Applications
Importance
Definition
Neural networks are computational models inspired by the structure and functioning of the brain. They consist of
layers of interconnected artificial neurons that learn patterns and relationships from data through training.
Functions
Applications
Importance
Forms the core of modern artificial intelligence and deep learning systems.
Enables advanced capabilities like real-time object detection and language understanding.
Summary Table
Biological brain and neural Symbolic logic and rule-based Artificial neurons and learning
Based On
function reasoning models
Learning Capability Biological, natural learning No learning (predefined rules) Learns from data
Flexibility High (adaptive to stimuli) Low (rigid and deterministic) High (adaptive and scalable)
Definition
An Artificial Neuron is a mathematical model inspired by the structure and function of a biological neuron. It is the
basic building block of an artificial neural network (ANN). It takes input values, processes them using weights and a
bias, applies an activation function, and produces an output.
Main Components
1. Inputs (x1,x2,….xn)
Numeric data received by the neuron from the outside or from previous layers.
3. Bias (b)
A constant added to the weighted sum. It helps shift the output curve and enables the neuron to produce a
result even when all inputs are zero.
y = f(z)
Output
Function Formula Use Case
Range
f(z) = 1 if z > 0
Step 0 or 1 Binary classification
f(z) = 0 if z <= 0
Importance
Definition:
Learning methods in neural networks refer to algorithms or rules that guide how the network adjusts its internal
parameters (weights and biases) based on input data, to perform tasks such as classification, prediction, clustering,
etc.
These methods help the neural network learn patterns or knowledge from data and can be broadly categorized into:
Supervised Learning
Unsupervised Learning
Reinforcement Learning
Below are three key unsupervised learning methods: Hebbian, Competitive, and Boltzmann Learning.
1. Hebbian Learning
Definition:
Formula:
[ADD FORMULA]
Function:
Importance:
2. Competitive Learning
Definition:
In Competitive Learning, neurons compete to become active, and only one neuron (the winner) is updated during
training. This is also known as Winner-Takes-All (WTA) learning.
[ADD FORMULA]
Function:
Only one neuron (with the closest match) is allowed to learn from the input.
Applications:
Pattern classification
Data compression
Importance:
3. Boltzmann Learning
Definition:
Boltzmann Learning is a probabilistic, stochastic learning algorithm used in Boltzmann Machines, based on energy
minimization and thermodynamics. It aims to reach a global optimum through simulated annealing.
Energy Function:
[ADD FORMULA]
[ADD FORMULA]
Function:
Gradually updates weights to reduce the difference between actual and model data.
Applications:
Importance:
Probabilistic, based on
Weight Update Based on co-activation Winner neuron only
energy
Target Output
No No No
Required
Perceptron, Adaline, and Madaline are early artificial neural network models, with Adaline and Madaline being
extensions of the perceptron concept. Adaline is a single-layer network using a linear activation function, while
Madaline is a multi-layer network of Adaline units.
Perceptron:
A simple, single-layer artificial neural network that learns by adjusting weights based on the
difference between the predicted and actual output.
It takes weighted inputs, sums them, and applies a threshold function to produce a binary output (0
or 1).
Can only learn linearly separable patterns, meaning it can only separate data points that can be
divided by a straight line (or hyperplane in higher dimensions).
A single-layer perceptron is a linear model, while a multilayer perceptron (MLP) is a more complex
network with multiple layers and non-linear activation functions.
Where:
η = learning rate
Advantages:
Limitations:
Cannot solve problems where data is not linearly separable (e.g., XOR problem)
Applications:
Solving linearly separable binary classification tasks (e.g., spam vs. non-spam)
Helpful in teaching fundamental concepts of machine learning, like weight updates and error correction
An extension of the perceptron, but instead of a step activation function, it uses a linear activation
function.
Activation Function:
f(z) = z
Advantages:
• Minimizes continuous error using Mean Squared Error (MSE)
• Converges more reliably than the Perceptron algorithm
• More accurate for real-valued outputs
• Uses differentiable activation functions, allowing smooth gradient-based optimization
• Can be extended to multilayer architectures for more complex tasks
• Better generalization performance for linearly separable data
• Supports efficient learning using gradient descent
Limitations:
• Still limited to linearly separable data when used in a single layer
• Cannot handle non-linear patterns or complex decision boundaries on its own
• Sensitive to input feature scaling
• Performance degrades with noisy or overlapping data
• Requires differentiable activation and loss functions
• May get stuck in local minima depending on the optimization method
Applications:
• Signal processing tasks like enhancement and transformation
• Noise filtering in audio, images, or sensor data
• Real-time prediction and regression tasks (e.g., weather forecasting, stock prediction)
• Function approximation in control systems and robotics
• Time-series forecasting with simple trend detection
• Calibration of sensor data and normalization functions
• Used as a foundational layer in multilayer neural networks and deep learning models
A multi-layer network of Adaline units, allowing it to perform more complex tasks than a single
Adaline.
Madaline networks can be used for tasks like echo cancellation, signal prediction, and adaptive
beamforming antennas.
Advantages:
Can handle non-linearly separable problems using hidden layers
Works well with non-linear activation functions like sigmoid, tanh, or ReLU
Forms the foundation of modern neural networks like CNNs and RNNs
Limitations:
Applications:
Activation
Step (Binary) Linear (followed by threshold) Linear + Majority Logic
Function
Learning Rule Perceptron Learning Rule Least Mean Square (LMS) Madaline Rule (MR-I, MR-II)
Feature Perceptron Adaline Madaline
Convergence May not converge always Converges better Better accuracy and learning
Applications Logic gate simulation Noise filtering, prediction Speech, pattern recognition
A single layer neural network is the simplest type of feedforward network with only one layer of weights connecting
input features directly to the output node(s). It does not contain hidden layers and is mainly used for solving linearly
separable classification problems.
• Structure:
– It has an input layer that receives data, and an output layer that produces the final prediction or classification.
– There are no hidden layers between the input and output, meaning the input data is directly processed to
generate the output.
– Each input is connected directly to the output neuron using adjustable weights.
• Importance:
– Forms the basic structure of neural networks and introduces the concept of weight-based learning.
– Useful for understanding core ML principles like decision boundaries and linear classification.
• Function:
– It's used for simple tasks, such as linear classification, where the decision boundary is a straight line.
– Each input is multiplied by a weight, and the weighted inputs are summed, and then passed through an activation
function to produce an output.
• Limitations:
– Single-layer neural networks are limited to linearly separable data, meaning they cannot learn complex, non-linear
patterns.
– They are not suitable for tasks that require feature extraction or complex decision-making.
• Applications:
– Binary classification tasks such as spam vs. not spam, pass/fail detection.
• Example:
– A single-layer perceptron can be used for simple binary classification tasks, such as distinguishing between emails
that are spam and not spam.
Backpropagation:
Definition:
Backpropagation is a learning algorithm that helps a neural network learn by reducing the error between actual and
predicted output. It updates weights by sending error backwards.
Backpropagation is a machine learning algorithm that adjusts the weights of a neural network to reduce errors. It's a
key part of artificial neural networks (ANNs) and deep learning.
• Structure:
– During the forward pass, input data is propagated through the network to produce an output.
– During the backward pass, the error between predicted and actual output is propagated backward to adjust
weights.
• Importance:
– Makes training deep networks possible, forming the backbone of modern deep learning.
• Function:
– Uses the chain rule of calculus to distribute the error back through the layers.
– Adjusts weights to reduce error using a learning rate, refining the model's accuracy over time.
• Limitations:
– Can get stuck in local minima during training and may suffer from vanishing gradients.
• Applications:
• Example:
– Used in training a neural network on the MNIST dataset to recognize handwritten digits by minimizing prediction
error.
A Multilayer Neural Network, also known as a Multilayer Perceptron (MLP), is a type of artificial neural network
characterized by having multiple layers, including an input layer, one or more hidden layers, and an output layer.
• Structure:
– Consists of an input layer, one or more hidden layers, and an output layer.
– Neurons in each layer are fully connected to the neurons in the next layer.
– Non-linear activation functions like ReLU, sigmoid, or tanh are used in hidden layers.
• Importance:
• Function:
– Takes input data and transforms it through multiple layers to generate a prediction.
• Limitations:
• Applications:
• Example:
– A multilayer neural network can classify images by identifying features like edges, shapes, and objects,
distinguishing between cars, people, and animals.