Chapter 5 - 7
Chapter 5 - 7
LEARNING
1
INTRODUCTION TO LEARNING
• Machine Learning is an application of Artificial Intelligence (AI) which
enables a program(software) to learn from the experiences and improve
their self at a task without being explicitly programmed. Machine learning
was introduced by Arthur Samuel in 1959.
• Data is also called the fuel for Machine Learning and we can safely say that
there is no machine learning without data.
2
INTRODUCTION TO LEARNING
• In ML, when agents are exposed to new data, they learn, grow, change,
and develop by themselves.
• Then on the basis of this input, machine makes better decision by looking for
some patterns in data.
3
HOW CAN MACHINE LEARN?
• The Machine Learning process starts with inputting training data into
the selected algorithm.
• New input data is fed into the machine learning algorithm to test
whether the algorithm works correctly.
• The prediction and results are then checked against each other.
• If the prediction and results don’t match, the algorithm is re-trained
multiple times until it gets the desired outcome.
time.
LEARNING COMPONENTS
• The learning system consists of the following components:
Goal: Defined with respect to the task to be performed by the
system.
Supervised Learning
Unsupervised Learning
Reinforcement Learning
6
SUPERVISED LEARNING
Supervised Learning: we use known or labeled data(Target) for the training.
Since the data is known, the learning is, therefore, supervised, i.e., directed into
successful execution.
Once the model is trained based on the known data, you can use unknown data into the
model and get a new response.
It uses external feedback to learning functions that map inputs to output
observations. In those models the external environment acts as a “teacher” of the AI
algorithms.
7
SUPERVISED LEARNING
• In Supervised Learning, we have two sets of variables called the target variable, or
labels (the variable we want to predict) and features(variables that help us to
predict target variables).
• We show the program(model) the features and the label associated with these
features and then the program is able to find the underlying pattern in the data. Take
this example of the dataset where we want to predict the price of the house given its
size. The price which is a target variable depends upon the size which is a feature.
5 $500
SUPERVISED LEARNING
• We can group the supervised learning problems as:
Regression problems: used to predict future values and the model is
trained with the historical data. Regression algorithms are used to
predict the continuous values such as, salary, age, Predicting the
future price of a house.
predicting a quantity.
SUPERVISED LEARNING:
CLASSIFICATION
• Classification Algorithms can be further divided into two category:
• Linear Models
Logistic Regression
Support Vector Machines
• Non-linear Models
K-Nearest Neighbors
Kernel SVM
Naïve Bayes
Decision Tree Classification
Random Forest Classification 10
EXERCISE
• 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:
Advertisement Sales Advertisement Sales
90 1000 90 Low
120 1500 120 Medium
150 2000 150 High
100 1300 100 Medium
130 1600 130 High
200 ?? 200 ??
11
The type of problem: Regression The type of problem:
Classification
UNSUPERVISED LEARNING
• Unsupervised Learning: is a machine learning technique in which models are
not supervised using training dataset. Instead, models itself find the hidden
patterns and insights from the given data. It can be compared to learning
which takes place in the human brain while learning new things.
12
UNSUPERVISED LEARNING
• Unsupervised approach is the one where we have no target variables, and we have
only the input variable(features) at hand.
• The algorithm learns by itself and discovers an impressive structure in the data. The
goal is to decipher the underlying distribution in the data to gain more knowledge
Clustering: this means bundling the input variables with the same characteristics
together. E.g., grouping users based on search history
Association: discover the rules that govern meaningful associations among the
13
data set. E.g., People who watch ‘X’ will also watch ‘Y’.
UNSUPERVISED LEARNING
• Some example of unsupervised learning algorithms:
K-means clustering
14
REINFORCEMENT LEARNING
• Reinforcement Learning: works on a feedback-based process, in which
an agent automatically explore its surrounding by trail, taking action,
learning from experiences, and improving its performance.
• Agent gets rewarded for each good action and get punished for each
bad action; hence the goal of reinforcement learning agent is to
maximize the rewards.
17
ANN: MULTILAYER PERCEPTRON
• Multilayer Perceptron: consists of more than one perception which is
grouped together to form a multiple layer neural network. In contrast
to perceptron, multilayer networks can learn not only multiple decision
boundaries, but the boundaries may be nonlinear.
18
LEARNING IN ANN
• Learning a perceptron means finding the right values for W.
• The perceptron learning algorithm can be stated as below.
1. Assign random values to the weight vector
a. Yes. Quit
19
LEARNING IN ANN
Learning means minimizing the error term.
In the Neural Network, we take the computed loss value
back to each layer so that it updates the weights in such a
way that minimizes the loss.
On the other hand, the process of going from left to right
i.e from the Input layer to the Output Layer for the
adjustment is known as the Forward Propagation.
20
LEARNING IN ANN
• Forward Propagation is the way to move from the Input layer (left)
to the Output layer (right) in the neural network. The process of
moving from the right to left i.e backward from the Output to the
Input layer is called the Backward Propagation.
21
DEEP LEARNING
• It is a subfield of Machine Learning, inspired by the biological
neurons of a brain. Most deep learning methods use neural network
architectures, which is why deep learning models are often referred
to as deep neural networks.
• Deep learning algorithms work with almost any kind of data and
require large amounts of computing power and information to solve
22
complicated issues.
DEEP LEARNING
• The term deep usually refers to the number of hidden layers in the
neural network. Traditional neural networks only contain 2-3 hidden
layers, while deep networks can have as many as 150.
23
DEEP LEARNING
• The most popular deep learning algorithms are:
Convolutional Neural Networks (CNNs)
Long Short Term Memory Networks (LSTMs)
Recurrent Neural Networks (RNNs)
Generative Adversarial Networks (GANs)
Self Organizing Maps (SOMs)
Deep Belief Networks (DBNs)
Restricted Boltzmann Machines( RBMs)
Autoencoders
24
DEEP LEARNING
• Convolutional Neural Networks (CNNs): also known as ConvNets, consist of
multiple layers and are mainly used for image processing and object detection.
Yann LeCun developed the first CNN in 1988 when it was called LeNet.
• CNN's are widely used to identify satellite images, process medical images,
forecast time series, and detect anomalies.
25
DEEP LEARNING
• Recurrent Neural Networks(RNNs): consist of some directed
connections that form a cycle that allow the output provided to be
used as input in the current phase of RNNs. RNNs are mostly used in
captioning the image, time series analysis, recognizing handwritten
data, and translating data to machines.
26
DEEP LEARNING
• LSTMs are a type of Recurrent Neural Network (RNN) that can learn
and memorize long-term dependencies. Recalling past information for
long periods is the default behavior.
27
GENERALIZATION AND OVERFITTING
• The situation where any given model is performing too well on the training
data but the performance drops significantly over the test set is called an
• If the model is performing poorly over the test and the train set, then we call
that an underfitting model. Poor performance on the training data and poor 28
30
INTRODUCTION
NLP is the technology that is used by machines to understand, analyze,
manipulate, and interpret human's languages.
It helps developers to organize knowledge for performing tasks such as translation, automatic
32
INTRODUCTION
33
Steps in NLP
Lexical Analysis(Morphological Analysis): The first phase of NLP
is the Lexical Analysis. This phase scans the source code as a stream
of characters and converts it into meaningful lexemes. It divides the
whole text into paragraphs, sentences, and words.
• Semantics: concerns what words mean and how these meaning combine
in sentences to form sentence meaning.
37
NATURAL LANGUAGE PROCESSING
• Pragmatics: concerns how sentences are used in different
situations and how use affects the interpretation of the sentence.
38
components of NLP.
39
NATURAL LANGUAGE PROCESSING
• Natural Language Understanding
Syntactic analysis,
Semantic analysis,
Discourse analysis, …
40
NATURAL LANGUAGE PROCESSING
Syntactic generation
41
WHY NLP IS DIFFICULT?
• For example, consider these three sentences:
• But this is a problem for machine. we have to code rules for each and
every combination of words in any natural language to help a machine
42
understand, then things will get very complicated very quickly.
• Natural Language processing is considered as difficult problem in
computer science. The difficulty in NL understanding arises from the
different facts:
Contextual words, phrases and homonyms :the same words and phrases
can have different meanings based on the context of a sentence.
o Referential Ambiguity
Referential Ambiguity exists when you are referring to something using the
pronoun. Example: Kiran went to Sunita. She said, "I am hungry. “ In the
above sentence, you do not know that who is hungry, either Kiran or Sunita.
46
CORPUS
• A corpus is a large and structured set of machine
readable texts that have been produced in a natural
communicative setting.
• Machine Translation refers to converting a text in language A into the corresponding text in language B
(or speech).
• Interlingua based systems: (only trains one model for translating many languages. To
achieve this, it uses a shared representation of a sentence meaning.)
• Transfer based systems:( it trains specific model for each language to translate from one
to another.)
• Challenges are to acquire the required knowledge resources such as mapping rules and bi-lingual
dictionary?
49
Applications of Natural Language Processing
50
Applications of Natural Language Processing
Corrector
51
Quiz(5%)
Which types of Ambiguity exists in the following
sentences?
1.The boy told his father the theft. He was very upset.
2.The professor said on Monday he would give an exam.
3.The chicken is ready to eat.
4.I saw Chala near the bank.
5. I gave her the book with the cover.
52
CHAPTER 7: ROBOTICS
ROBOTICS
Introduction
• The Word robot was coined by a Czech novelist Karel Capek in a 1920 play titled Rassum’s
• Robotics is the term used in artificial intelligence that deals with a study of creating intelligent
• The aim of the robot is to manipulate the objects by perceiving, moving, picking, modifying the
54
Introduction
• Robotics is a branch of Artificial Intelligence (AI), it is mainly composed of
electrical engineering, mechanical engineering and computer science for
construction, design and application of robots.
• Robots have electrical components for providing power and control the
machinery.
• It contains some type of computer program that determines what, when and how
a robot does something.
55
• 55
Introduction
• A robot is a reprogrammable, multifunctional manipulator designed to move
57
Main Components Of Robot
• Control system: are programmed to tell a robot how to utilize its specific
components, similar in some ways to how the human brain sends signals
• Sensors provide a robot with stimuli in the form of electrical signals that are
processed by the controller and allow the robot to interact with the outside world.
• There are different type of sensors available to choose from, and the characteristics
of sensors are used for determining the type of sensor to be used for particular
application. 58
Main Components Of Robot
• Common sensors found within robots include video cameras that function as eyes,
photoresistors that react to light and microphones that operate like ears etc.
59
Main Components Of Robot
• Actuators: a device can only be considered to be a robot if it has a movable frame
or body. Actuators are the components that are responsible for this movement. They
are made up of motors that receive signals from the control system. Common
robotic actuators utilize combinations of different electro mechanical devices.
60
Main Components Of Robot
• Locomotion is the method of moving from one place to another. The mechanism
that makes a robot capable of moving in its environment is called as robot
locomotion.
Legged
Wheeled
Tracked slip/skid
61
Main Components Of Robot
• Legged locomotion: requires more number of motors for accomplish a movement.
It is suited for rough as well as smooth terrain where irregular or too smooth
surface makes it consume more operational power. It is little difficult to implement
because of stability issues.
• It comes up with the variety of one, two, four, and six legs. If a robot has multiple
legs then leg coordination is required for locomotion.
62
Main Components Of Robot
• Wheeled Locomotion: requires less number of motors for accomplishing a
movement. It is little easy to implement as there are lesser stability issues in case of
more number of wheels. It is more power efficient as compared to legged
locomotion.
wheels are provided with a spherical ball made of nylon, plastic or any hard material fixed
in a holder.
Castor wheels are easy to implement and have high load capacity. However, the major
limitation of castor wheels is that there is a high degree of traction and therefore more
power consumption.
Omni directional wheels: attached to large wheels at an angle of 45° to form a multi
Omni wheels are designed such that the axis of the smaller wheels is at a right angle to the
axis of the large wheels, which enables to rotate parallel to its axis, generating low surface
64
resistance. These wheels are used for driving as well as steering the robot.
Main Components Of Robot
Orientable wheels: mounted on an omni-directional fork support. There are two
types of orientable wheels; centered and off-centered. Centered wheels have a
vertical axle passing through the wheel center, while the off-centered wheels have a
vertical axis slightly off-centered from the its center
• Slip/Skid Locomotion: the vehicles use tracks as available in a tank. The robot is
steered by moving tracks with different speeds in the same or opposite direction. It
offers stability because of large contact area of ground and track.
65
Main Components Of Robot
• Power Supply: Like the human body requires food in order to function, robots
require power. Stationary robots, such as those found in a factory, may run on AC
power through a wall outlet but more commonly, robots operate via an internal
battery.
• Most robots utilize lead-acid batteries for their safe qualities and long shelf life
while others may utilize the more compact but also more expensive silver-cadmium
variety.
• Safety, weight, replace ability and lifecycle are all important factors to consider
when designing a robot’s power supply.
66
Types Of Robots
• All robots vary in design, functionality and degree of autonomy.
• They cannot change their behavior while they are working, and no human is
guiding their actions.
67
Types Of Robots
• Humanoid robots are robots that look like and/or mimic human behavior. These
robots usually perform human-like activities (like running, jumping and carrying
objects), and are sometimes designed to look like us, even having human faces and
expressions. Two of the most prominent examples of humanoid robots are Hanson
Robotics’ Sophia and Boston Dynamics’ Atlas.
68
Types Of Robots
• Autonomous robots: operate independently of human operators. These robots are
usually designed to carry out tasks in open environments that do not require human
supervision. They are quite unique because they use sensors to perceive the world
around them, and then employ decision-making structures to take the optimal next
step based on their data and mission.
69
Types Of Robots
• Teleoperated robots are semi-autonomous bots that use a wireless network to
enable human control from a safe distance. These robots usually work in extreme
geographical conditions, weather, circumstances, etc.
70
Types Of Robots
71
Thank You
አመሰግናለሁ !
Galatoomaa!
Wish you all the best !