Share ML Topic1A

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 24

CHAPTER 1:

Introduction
What is Machine Learning?

Machine Learning is the field of study that


gives computers the capability to learn
without being explicitly programmed. ML
is one of the most exciting technologies
that one would have ever come across. As
it is evident from the name, it gives the
computer that makes it more similar to
humans: The ability to learn.
In supervised learning, we use known or labeled data for the training data. Since the data is
known, the learning is, therefore, supervised, i.e., directed into successful execution. The
input data goes through the Machine Learning algorithm and is used to train the model. Once
the model is trained based on the known data, you can use unknown data into the model and
get a new response.
Application
1.Image Classification: Identifying objects or scenes within
images, such as detecting cats in pictures.
2.Speech Recognition: Converting spoken language into text, like
transcribing audio recordings or enabling virtual assistants.
3.Predictive Analytics: Forecasting future trends based on
historical data, used in financial markets, sales forecasting, etc.
4.Medical Diagnosis: Analyzing patient data to predict diseases or
conditions and suggest appropriate treatments.
5.Email Spam Detection: Classifying emails as spam or not spam
based on their content and characteristics.
In unsupervised learning, the training data is unknown and unlabeled - meaning that no one
has looked at the data before. Without the aspect of known data, the input cannot be guided
to the algorithm, which is where the unsupervised term originates from. This data is fed to
the Machine Learning algorithm and is used to train the model. The trained model tries to
search for a pattern and give the desired response.
Applications
1. Clustering: Grouping similar data points together, such as segmenting
customers based on their purchasing behavior.
2. Anomaly Detection: Identifying rare or unusual patterns in data, like
detecting fraudulent transactions.
3. Market Basket Analysis: Analyzing customer purchase behavior to
discover associations between products, used in retail for cross-selling
strategies.
4. Document Clustering: Organizing documents into groups based on their
content, assisting in information retrieval and categorization.

8
•Reinforcement Learning is a feedback-based Machine learning technique in which an
agent learns to behave in an environment by performing the actions and seeing the
results of actions. For each good action, the agent gets positive feedback, and for each
bad action, the agent gets negative feedback or penalty.
•In Reinforcement Learning, the agent learns automatically using feedbacks without any
labeled data, unlike supervised learning.
Deep Learning
Deep learning is a branch of machine learning which is based on
artificial neural networks. It is capable of learning complex patterns
and relationships within data. In deep learning, we don’t need to
explicitly program everything. It has become increasingly popular in
recent years due to the advances in processing power and the
availability of large datasets.
How do ANNs work?
 An artificial neural network (ANN) is either a hardware
implementation or a computer program which strives to
simulate the information processing capabilities of its biological
exemplar. ANNs are typically composed of a great number of
interconnected artificial neurons. The artificial neurons are
simplified models of their biological counterparts.
 ANN is a technique for solving problems by constructing software
that works like our brains.
Biological Neurons

Dendrites: Input
Cell body: Processor
Synaptic: Link
Axon: Output
Abstract Neurons
 Neurons can represent neuron-like things
 Inputs -> Processes -> Outputs

Image taken from http://3.bp.blogspot.com/


How do ANNs work?

An artificial neuron is an imitation of a human neuron


How do ANNs work?
• Now, let us have a look at the model of an artificial neuron.
How do ANNs work?

Input xm ...... x2 x1
......
Processing ∑
∑= X1+X2 + ….+Xm =y

Output y
How do ANNs work?
Not all inputs are equal
xm ...... x2 x1
Input
......
wm
weights .. w2 w1

..
Processing . ∑ ∑= X1w1+X2w2 + ….+Xmwm
=y

Output y
How do ANNs work?
The signal is not passed down to the
next neuron verbatim
xm ...... x2 x1
Input
......
w2
wm
weights .. w1

..
Processing . ∑
Transfer Function
(Activation Function) f(vk)

Output y
The output is a function of the input, that is
affected by the weights, and the transfer
functions
Artificial Neural Networks
An ANN can:
1. compute any computable function, by the appropriate
selection of the network topology and weights values.
2. learn from experience!
 Specifically, by trial‐and‐error
Learning by trial‐and‐error
Continuous process of:
Trial:
Processing an input to produce an output (In terms of ANN:
Compute the output function of a given input)
Evaluate:
Evaluating this output by comparing the actual output
with the expected output.
Adjust:
Adjust the weights.
How it works?
 Set initial values of the weights randomly.
 Input: truth table of the XOR
 Do
 Read input (e.g. 0, and 0)
 Compute an output (e.g. 0.60543)
 Compare it to the expected output. (Diff= 0.60543)
 Modify the weights accordingly.
 Loop until a condition is met
 Condition: certain number of iterations
 Condition: error threshold
Weights Adjusting
After each iteration, weights should be adjusted to
minimize the error.
– All possible weights
– Back propagation
Back Propagation
Back-propagation is an example of supervised
learning is used at each layer to minimize the error
between the layer’s response and the actual data
The error at each hidden layer is an average of the
evaluated error
Hidden layer networks are trained this way

You might also like