What Is a Neural Network?
A neural network is a machine learning model made of connected units called neurons. It takes input data, processes that data through one or more layers, and produces an output or prediction.
In simple words
A neural network is a system that learns patterns from examples and uses those learned patterns to make predictions on new data.
A Simple Real-World Example
Imagine that we want a computer to determine whether an email is spam or not spam.
We can give the model information about an email, such as:
The neural network processes this information and produces an output.
The Basic Structure of a Neural Network
A basic neural network contains three main parts: an input layer, one or more hidden layers, and an output layer.
1. Input Layer
The input layer receives the information that we want the neural network to process.
For example, if we are predicting whether a house is expensive, the inputs could be:
These inputs are called features.
2. Hidden Layers
Hidden layers are where the network processes the input and learns useful patterns.
A neural network can have one hidden layer or many hidden layers.
The more complex the problem, the more layers and neurons a model may need. However, adding more layers does not automatically make a model better.
3. Output Layer
The output layer produces the final result of the neural network.
The output depends on the problem we are solving.
Two examples
Image classification: Cat or Dog
House price prediction: $350,000
What Are Neurons?
A neuron is a small computational unit inside a neural network.
A neuron receives values, processes them, and produces an output.
A layer can contain many neurons working together.
How Does a Neural Network Learn?
The network starts with parameters that are not yet good enough to make accurate predictions.
It makes predictions, compares those predictions with the correct answers, and adjusts its parameters to reduce the error.
This process happens many times during training. Over time, the network can learn useful patterns from the training data.
A Very Simple Example
Suppose a neural network is trying to predict whether a student will pass an exam.
We provide:
The neural network processes these inputs and might produce:
Prediction = 0.92
If we interpret values close to 1 as "Pass", the model is predicting that the student will probably pass.
Why Is It Called a "Neural Network"?
The name comes from the fact that its structure is loosely inspired by the way biological neurons are connected.
But don't take this analogy too literally.
Important
Artificial neural networks are mathematical models. They are inspired by biological neurons, but they do not work exactly like the human brain.
Neural Networks and Machine Learning
A neural network is one type of machine learning model.
Deep Learning generally refers to using neural networks with multiple layers to learn complex patterns from data.
A Simple Way to Think About It
The network is not given every possible answer. Instead, it learns patterns from examples and uses those patterns to make predictions on new data.
What You Should Remember
A neural network is a machine learning model made of connected neurons arranged into layers. Data enters through the input layer, is processed by hidden layers, and produces a result through the output layer.
Check Your Understanding
What is a neural network?
A machine learning model made of connected
computational units called neurons.
What does the input layer do?
It receives the input features.
What happens in hidden layers?
The network processes information and learns
patterns from the data.
What does the output layer do?
It produces the final prediction or result.