Unit 2 ML
Unit 2 ML
1. **Input Layer**: This layer consists of input neurons that receive the initial
data or features. Each neuron represents one feature of the input data.
2. **Hidden Layers**: These are layers between the input and output layers
where computation occurs. Each hidden layer consists of multiple neurons,
and each neuron is connected to every neuron in the previous and following
layers.
3. **Output Layer**: The final layer produces the output of the network. It
could represent predictions, classifications, or any other desired outcome
based on the input data.
7. **Bias**: Each neuron typically has an associated bias term, which allows
the network to capture patterns that don't necessarily pass through the origin
(0,0) in the input space.
The process of training a neural network involves presenting input data along
with the corresponding desired outputs to the network, adjusting the weights
and biases iteratively through backpropagation and optimization algorithms
(such as gradient descent), until the network's output closely matches the
desired outputs. Once trained, the neural network can be used to make
predictions or classify new, unseen data.
Perceptron:
A perceptron is the simplest form of a feedforward artificial neural network. It
consists of a single layer of neurons (nodes) with direct connections between
the input and output layers. Perceptrons were introduced by Frank Rosenblatt
in the late 1950s and are the building blocks of more complex neural network
architectures.
1. **Input Layer**: The input layer consists of one or more input neurons,
each representing a feature of the input data. The number of input neurons is
determined by the dimensionality of the input data.
1. **Input Layer**: The input layer consists of neurons representing the input
features of the data. Each neuron corresponds to one feature, and the number
of neurons in this layer is determined by the dimensionality of the input data.
2. **Hidden Layers**: These are the layers between the input and output
layers where computation occurs. Each hidden layer consists of multiple
neurons, and each neuron is connected to every neuron in the previous and
following layers. The presence of multiple hidden layers allows the network to
learn complex and nonlinear relationships in the data.
4. **Update Weights**: Once the gradients of the loss function with respect to
the weights are computed, the weights are adjusted in the direction that
reduces the error. This is typically done using an optimization algorithm such
as stochastic gradient descent (SGD) or one of its variants (e.g., Adam,
RMSprop). The learning rate parameter determines the size of the weight
updates.
5. **Repeat**: Steps 1-4 are repeated iteratively for multiple epochs or until
convergence, with the network gradually improving its performance on the
training data.