0% found this document useful (0 votes)
6 views5 pages

Chapter 5 Summary

Neural networks are computational models inspired by the human brain, consisting of interconnected artificial neurons that process inputs through weighted connections and activation functions. They learn by adjusting weights via backpropagation and gradient descent, minimizing errors in predictions. Applications include handwriting recognition, face recognition, and time series prediction.
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)
6 views5 pages

Chapter 5 Summary

Neural networks are computational models inspired by the human brain, consisting of interconnected artificial neurons that process inputs through weighted connections and activation functions. They learn by adjusting weights via backpropagation and gradient descent, minimizing errors in predictions. Applications include handwriting recognition, face recognition, and time series prediction.
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/ 5

1. What is a Neural Network?

Imagine your brain has billions of tiny workers (neurons) that talk to each other to solve
problems. An ANN mimics this!

 Biological vs. Artificial Neurons:

o Biological Neuron:

 Dendrites: Like antennas that pick up signals (inputs).


 Soma: The "brain" of the neuron that processes signals.
 Axon: A wire that sends out the processed signal (output).
 Synapses: Bridges between neurons—stronger bridges mean better communication.
o Artificial Neuron:

 Takes inputs (e.g., numbers like age, temperature).


 Weighs them (like adjusting volume knobs).
 Adds a "bias" (a personal preference, e.g., "I always say yes if the sum is over 5").
 Uses an activation function to decide if it should "fire" (send an output).

Example:

 Inputs: x1=0.3x1=0.3 (normalized age),


x2=0.8x2=0.8 (normalized salary).
 Weights: w1=0.5w1=0.5 (age importance), w2=0.5w2=0.5 (salary importance).
 Weighted
Sum: (0.3×0.5)+(0.8×0.5)=0.15+0.40=0.55(0.3×0.5)+(0.8×0.5)=0.15+0.40=0.
55.
 Activation Function (Step):

o If sum ≥0.5≥0.5 , output = 1 ("Yes, this person gets a loan").


o Result: 0.55≥0.50.55≥0.5 → Output = 1.

2. Data Normalization: Why and How?


Why Normalize?
Imagine comparing apples (0-100 grams) and watermelons (0-10 kg). To compare fairly,
scale both to 0-1!

 Example: Test scores (0-100) → Scale to 0-1.

Methods:

1. Max-Min Normalization:

o Formula:

Scaled Value=Original Value - Min ValueMax Value - Min Value×(New Max -


New Min)+New MinScaled Value=Max Value - Min ValueOriginal Value - Min
Value×(New Max - New Min)+New Min

o Example: Scale test scores (0-100) to 0-1:


 A score of 75 → 75−0100−0×(1−0)+0=0.75100−075−0×(1−0)+0=0.75.
2. Standardization:

o Formula:

Scaled Value=Original Value - MeanStandard DeviationScaled Value=Standar


d DeviationOriginal Value - Mean

o Example: If class scores have a mean of 50 and std. dev. of 10:


 A score of 75 → 75−5010=2.51075−50=2.5.

3. Layers in a Neural Network

Think of layers like a factory assembly line:

1. Input Layer:

o Raw materials arrive here (e.g., 3 nodes for age, height, weight).
2. Hidden Layers:
o Workers process the materials (e.g., combine age and weight to guess health).
o Number of Layers/Nodes: More layers = more complex decisions (but slower!).
3. Output Layer:

o Final product (e.g., 1 node for "healthy" or "unhealthy").

Fully Connected: Every worker (node) in one layer talks to all workers in the next layer.

4. How Neural Networks Learn: Backpropagation

Imagine a student learning from mistakes:

1. Forward Pass (Making a Guess):

o Inputs flow through layers to produce an output.


o Sigmoid Activation: Squishes numbers into 0-1 (like a probability):
Output=11+e−(Weighted Sum + Bias)Output=1+e−(Weighted Sum + Bias)1

o Example: Weighted sum = 2 → Output = 11+e−2≈0.881+e−21≈0.88 .


2. Calculate Error (Spotting Mistakes):

o Compare output to the correct answer (e.g., true label = 1).


o Output Layer Error:
Error=Output×(1−Output)×(True Label - Output)Error=Output×(1−Output)×(
True Label - Output)

o Example: Output = 0.88, True Label = 1 → Error


= 0.88×0.12×(1−0.88)=0.0130.88×0.12×(1−0.88)=0.013.
3. Backward Pass (Learning from Mistakes):

o Hidden Layer Error: Blame-share to previous layers:

Errorj=Outputj×(1−Outputj)×∑(Errors from next layer×Weights)Errorj


=Outputj×(1−Outputj)×∑(Errors from next layer×Weights)

o Example: Hidden layer error depends on output layer error and connection weights.
4. Update Weights (Adjusting Study Habits):

o Use a learning rate (like "how fast you learn") to adjust weights:

New Weight=Old Weight+(Learning Rate×Error×Input)New Weight=Old Wei


ght+(Learning Rate×Error×Input)

o Example:

 Old weight w=−0.3w=−0.3, Learning Rate = 0.9, Error = 0.1311, Input = 0.332:
 New w=−0.3+(0.9×0.1311×0.332)=−0.261w=−0.3+(0.9×0.1311×0.332)=−0.2
61.

5. Gradient Descent: The Optimization Engine

Goal: Find the lowest error (like finding the bottom of a valley blindfolded).

 How It Works:

o Calculate the slope (gradient) of the error curve.


o Move weights in the direction that reduces error.

Types:

1. Batch Gradient Descent:

o Uses all training data at once (accurate but slow).


2. Stochastic Gradient Descent (SGD):

o Updates weights after each sample (fast but noisy).


3. Mini-Batch Gradient Descent:

o Uses small batches (balance of speed and accuracy).

Momentum:

 Adds a "push" from previous steps to avoid getting stuck in small bumps (local minima).
6. Real-World Applications

1. Handwritten Digit Recognition:

o Your phone reads scribbled numbers (e.g., checks in banks).


2. Face Recognition:

o Social media tags friends in photos.


3. Time Series Prediction:

o Predicting stock prices or weather.

Summary Cheat Sheet

 Neurons: Tiny decision-makers with inputs, weights, bias, and activation functions.
 Normalization: Scaling data (e.g., 0-1) to compare fairly.
 Layers: Input (data), Hidden (processing), Output (result).
 Backpropagation: Learning by adjusting weights based on errors.
 Gradient Descent: Minimizing error by "walking downhill".
 Applications: Everywhere—from recognizing handwriting to predicting trends!

🔹 Key Terms:

 Activation Function: Decides if a neuron fires.


 Weights: Importance of inputs.
 Bias: Shifts decision boundaries.
 Learning Rate: Speed of learning.
 Epoch: One full training cycle.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy