Supervised ML
Supervised ML
learning
Types of classification
Types of Classification
• 1. Binary Classification
• 1. Determine the probability of heart attacks: With the help of a logistic model,
medical practitioners can determine the relationship between variables such as the
weight, exercise, etc., of an individual and use it to predict whether the person will
suffer from a heart attack or any other medical complication.
• 3. Identifying spam emails: Email inboxes are filtered to determine if the email
communication is promotional/spam by understanding the predictor variables and
applying a logistic regression algorithm to check its authenticity.
• Ex: consider an
organization in that
try to find weather
an employee will
get promotion or
not based on their
performance
Regression
•Example: Suppose
there is a marketing
company A, who does
various advertisement
every year and get
sales on that. The
below list shows the
advertisement made
by the company in the
last 5 years and the
corresponding sales:
Linear Regression:
• Y= aX+b
• Here, Y = dependent
variables (target
variables),
X= Independent
variables (predictor
variables),
a and b are the linear
coefficients
The Brain and Neuron
• Dendrites collects the input and
gives it to the cell body
• Cell body process the input and
produces the output
• Then the output is transferred
through the axons
• Axons transfer the output to the
next neuron through its dendrites
• A neuron in the brain works by receiving signals from other
neurons through its dendrites,
• Neurons are information messengers. They use electrical
and chemical signals to send information between different
areas of the brain, as well as between the brain, the spinal
cord, and the entire body.
• processing the information is done with in the cell body,
and finally sending an electrical impulse (action potential)
down its axon to transmit the signal to other neurons,
essentially acting as a communication unit within the brain
by releasing chemical messengers called neurotransmitters
• at the synapse where it connects to other neurons;
• this process allows for complex functions like thought,
memory, and movement.
Kinds of Neurons
• There are three kinds of neurons:
1.Sensory neurons carry information
from the sense organs (such as the
eyes and ears) to the brain.
2.Motor neurons control voluntary
muscle activity, such as walking and
talking, and carry messages from
nerve cells in the brain to the
muscles.
3.Other neurons, called interneurons,
make connections between sensory
and motor neurons.
Neural network
• A neural network is a massively collection of Neurons
interconnected with each other like human brain
consists of billions of neurons interconnected with each
other.
First computational neuron
• The first computational model of a neuron was proposed
by Warren MuCulloch (neuroscientist) and Walter Pitts
(logician) in 1943.
• It may be divided into 2 parts.
• Here x1,x2,x3………xn are the inputs
• The first part, g takes an input performs an aggregation
and based on the aggregated value the second
part, f makes a decision.
Artificial Neural Networks
• The term "Artificial Neural Network" is
derived from Biological neural networks that
develop the structure of a human brain.
• Similar to the human brain that has neurons
interconnected to one another, artificial
neural networks also have neurons that are
interconnected to one another in various
layers of the networks.
• These neurons are known as nodes.
• Since all these neurons are artificial
that’s why it is called as artificial
neural network.
• Dendrites from Biological Neural Network represent inputs in
Artificial Neural Networks, cell nucleus represents Nodes, synapse
represents Weights, and Axon represents Output.
Simple neural network
architecture
A basic neural network has interconnected artificial neurons in three layers:
• Input Layer
Information from the outside world enters the artificial neural network from the input layer. Input
nodes process the data, analyze or categorize it, and pass it on to the next layer.
• Hidden Layer
Hidden layers take their input from the input layer or other hidden layers. Artificial neural networks
can have a large number of hidden layers. Each hidden layer analyzes the output from the previous
layer, processes it further, and passes it on to the next layer. All the computations are done in hidden
layer.
• Output layer
The output layer gives the final result of all the data processing by the artificial neural network. It
can have single or multiple nodes.
What are the types of neural
networks?
• Artificial neural networks can be categorized by how the
data flows from the input node to the output node.
Below are some examples:
• Feedforward neural networks
• Feedforward neural networks process data in one
direction, from the input node to the output node. Every
node in one layer is connected to every node in the next
layer. A feedforward network uses a feedback process to
improve predictions over time.
Backpropagation algorithm
• As we have discussed above, data plays a significant role in machine learning, and
it must be of good quality as well.
• Noisy data, incomplete data, inaccurate data, and unclean data lead to less
accuracy in classification and low-quality results.
• Hence, data quality can also be considered as a major common problem while
processing machine learning algorithms.
3. Non-representative training data
• To make sure our training model is generalized well or not, we have to ensure that
sample training data must be representative of new cases that we need to
generalize. The training data must cover all cases that are already occurred as well
as occurring.
• Further, if we are using non-representative training data in the model, it results in
less accurate predictions. A machine learning model is said to be ideal if it
predicts well for generalized cases and provides accurate decisions. If there is less
training data, then there will be a sampling noise in the model, called the non-
representative training set. It won't be accurate in predictions. To overcome this, it
will be biased against one class or a group.
4. Overfitting and Underfitting
• Although Machine Learning and Artificial Intelligence are continuously growing in the
market, still these industries are fresher in comparison to others.
• Data Biasing is also found a big challenge in Machine Learning. These errors exist when
certain elements of the dataset are heavily weighted or need more importance than others.
• Biased data leads to inaccurate results, skewed outcomes, and other analytical errors.
However, we can resolve this error by determining where data is actually biased in the
dataset.