Unit I
Unit I
• To introduce students
to the basic concepts
and techniques of
Machine Learning and
become familiar with
Objective regression methods,
classification
methods, clustering
methods.
• Introduction to Machine
learning, Core concepts,
Data inconsistencies,
Practical Machine learning
applications, Types of
Unit I learning
Machine
architecture,
problems,
learning
Machine
learning algorithms.
• Linear Regression, Cost
Function, Gradient descent
and Logistic Regression.
Unit II CART
• Bayesian Networks: Graph
theory, probability theory,
Bayes theorem, working of
Bayesian Networks, Node
counts, using Domain
Experts.
• Deep learning:
Background, Deep
learning Taxonomy,
Convolutional
Unit IV Neural networks,
Recurrent Neural
Networks,
Autoencoders.
• Applications of Machine
learning:
• Image retrieval
• Face recognition
• Video classification.
Unit V • Image Segmentation
using K-means clustering
• Satellite Image
Classification using
Decision Trees.
Training
Testing
Data
Program Output
Rules
Machine Learning
Data
ML Rules/Patterns/
Intended Model
Output
One-dimensional basins
One basin of attraction, showing steepest descent paths
from various starting points
Dr K.Veera Swamy, Professorm ECE, VCE
Learning System
• A learning system is a collection of data that are brought together in a way that
creates an environment for learning processes.
Designing a Learning System in Machine Learning :
• According to Tom Mitchell, “A computer program is said to be learning from
experience (E), with respect to some task (T). Thus, the performance measure (P)
is the performance at task T, which is measured by P, and it improves with
experience E.”
Example: In Spam E-Mail detection,
• Task, T: To classify mails into Spam or Not Spam.
• Performance measure, P: Total percent of mails being correctly classified as being
“Spam” or “Not Spam”.
• Experience, E: Set of Mails with label “Spam”
Example
As an example, assume that a total of 300 emails were used to evaluate a model.
These emails were hand-labeled as either Spam or Not Spam.
Training
Prediction
Or
Inference
Like gardening
• Seeds = Algorithms
• Nutrients = Data
• Gardener = You
• Plants = Model
Past Future
Definition
X(1,1)=real(m1);
X(2,1)=real(m2);
X(3,1)=real(m3);
X(4,1)=real(m4);
Y(1,1)={'First'};
Y(2,1)={'First'};
Y(3,1)={'Second'};
Y(4,1)={'Second'};
%Test
T1 = imread(‘test.jpg');
Decision tree for classification test=mean2(T1);
label1 = predict(ctree,test)
1 if x1<127.078 then node 2 elseif x1>=127.078 then node 3 else First
2 class = First
3 class = Second
label1 =
1×1 cell array
{'Second'} Dr K.Veera Swamy, Professorm ECE, VCE
Core Concepts
At the heart of Machine learning is knowing and using the data appropriately.
Handling • Structured/unstructured
Data Types
Data Sets
•The training dataset refers to the data examples that are used to
learn or build a classifier, for example.
•The validation dataset refers to the data examples that are verified
against the built classifier and can help tune the accuracy of the
output.
•The testing dataset refers to the data examples that help assess
the performance of the classifier.
Dr K.Veera Swamy, Professorm ECE, VCE
Core Concepts
Universal set
(unobserved)
Phase 2— Phase 3—
Phase 1—
Validation Application
Training Phase
Phase Phase
Phase 1—Training Phase: This is the phase where training data is used to train
the model by pairing the given input with the expected output. The output of
this phase is the learning model itself.
Phase 2—Validation Phase: This phase is to measure how good the learning
model that has been trained is and estimate the model properties, such as error
measures, recall, precision, and others. This phase uses a validation dataset,
and the output is a sophisticated learning model.
Phase 3—Application Phase: In this phase, the model is subject to the real-
world data for which the results need to be derived.
Dr K.Veera Swamy, Professorm ECE, VCE
Learning-Prediction
Data
Model Behavior
Training: While training for machine learning, you pass an algorithm with training data.
The learning algorithm finds patterns in the training data such that the input parameters
correspond to the target. The output of the training process is a machine learning model
which you can then use to make predictions. This process is also called “learning”.
Model: A machine learning model can be a mathematical representation of a real-world
process. To generate a machine learning model you will need to provide training data to a
machine learning algorithm to learn from.
Dr K.Veera Swamy, Professorm ECE, VCE
Algorithms Machine Learning
• Supervised learning ( )
Algorithm
– Structured prediction or structured (output) Problem Categories
Types
learning is an umbrella term for supervised machine
learning techniques that involves
predicting structured objects, rather than Classification Supervised
• Reinforcement learning
– Decision making (robot, chess machine)
Association rule
Dimension
Dr K.Veera Swamy, Professorm ECE, VCE
Reduction
Machine learning structure
• Supervised learning
Unsupervised Reinforcement
Supervised
4
4
Algorithms
Supervised Unsupervised
Continuous
Dimensionality
Regression
reduction
Label
Present Absent
(SL) (USL)
Models
Artificial
Intelligence
Machine
Learning
Neural
Networks
Deep Learning
Neural Networks: Neural networks are a set of algorithms, modeled loosely after
the human brain, that are designed to recognize patterns. They interpret sensory
data through a kind of machine perception , labeling or clustering raw input. The
patterns they recognize are numerical, contained in vectors, into which all real-
world data, be it images, sound , text or time series, must be translated.
DL: Learning based on deep neural network. The subset of machine learning
composed of algorithms that permit software to train itself to perform tasks, like
speech and image recognition, by exposing multilayered neural networks to vast
amounts of data.
Dr K.Veera Swamy, Professorm ECE, VCE
Artificial Intelligence
Reasoning
Machine Learning
Natural
Language
Processing
Planning
Data
Inconsistencies
Unpredictable
Under-fitting Over-fitting Data Instability
Future
It occurs when a model learns the detail and noise in the training data to the
extent that it negatively impacts the performance of the model on new data.
Over-fitting usually occurs when the statistical model describes noise instead of
describing the relationships. A statistical model is said to be over-fitted, when
we train it with a lot of data . When a model gets trained with so much of data,
it starts learning from the noise and inaccurate data entries in our data set.
Algorithm
Problem Categories
Types
Classification Supervised
Regression Unsupervised
Clustering Reinforcement
Association rule
Dimension
Dr K.Veera Swamy, Professorm ECE, VCE
Reduction
Problem Categories
Supervised Unsupervised
Pass or Fail
Student Profile Classification
Percentage
Student Profile Regression
Intra Cluster
distances are
Inter Cluster minimized
distances are
maximized
Black dots
Example: Assume you have constructed a bag-of-words from each email, and
as a result you have a sample of bag-of-words vectors x1…. xm. For a
mathematical way to reduce dimension we will use PCA.
Algorithm
Types
Supervised
Unsupervised
Semi-supervised
Reinforcement
Dr K.Veera Swamy, Professorm ECE, VCE
Supervised Learning
Supervised learning as the name indicates the presence of a
supervisor. Basically supervised learning is a learning in which
we train the machine using data which is well labelled that
means some data is already tagged with the correct answer.
label
apple
apple
Classification: a finite set of
labels
banana
banana
Supervised learning:
Dr K.Veera Swamy, Professorm ECE,given
VCE labeled examples
Supervised learning: regression
label
-4.5
3.2
4.3
Supervised learning:
Dr K.Veera Swamy, Professorm ECE,given
VCE labeled examples
Supervised learning: ranking
label
1
Supervised learning:
Dr K.Veera Swamy, Professorm ECE,given
VCE labeled examples
Unsupervised Learning
Unsupervised learning is the training of machine using
information that is neither classified nor labeled and allowing
the algorithm to act on that information without guidance.
Here the task of machine is to group unsorted information
according to similarities, patterns and differences without any
prior training of data. Unlike supervised learning, no training
will be given to the machine. Machine is restricted to find the
hidden structure in unlabeled data by it-self.
Agent
Environment
Example:Human brain
Dr K.Veera Swamy, Professorm ECE, VCE
Deep Learning
/Tuning
collection/Training
Experimentation/Testing
ERP/Main frame/IOT
Preprocessing/Sample
Data Data Evaluation
Acquisition Processing
Feedback
Modeling
Deployment
-
ML Algorithms
• Data Acquisition: Acquire the raw data and store in the database.
• Data Processing: Preprocess the data as per the requirement (Cleaning the
data). The quality of the data and the useful information that can be derived
from it directly affects the ability of the model to learn. Useful information is
generated using sample collection.
• Modeling: Model parameters are learned directly from training data. Model
parameters are learned attributes that define the individual model. Hence,
model is built using training data. Machine learning algorithms are developed in
this phase.
• Evaluation: Evaluate each model in this phase using testing data. If you test the
model on the same data used to train it leads to over-fitting. Hence training
data and testing data should be separated.
• Deployment: All machine learning models are kept into production in this
phase. These models are applied for other applications also. Performance
feedback is carried to improve the models further.
Dr K.Veera Swamy, Professorm ECE, VCE
ML | Linear Regression vs Logistic Regression
Parameters: w0 , w1
Cost Function:
Goal:
Outline:
•Start with some w0 , w1
w0 , w1 J w0 , w1
Answer:
Example
• Answer:
Dr K.Veera Swamy, Professorm ECE, VCE
Example
• Answer:
Mean normalization:
X1=(size of bed room-1000)/2000
X2=(number of bed rooms-2)/4
Dr K.Veera Swamy, Professorm ECE, VCE
ML Applications-Image Recognition
A small video file contains more information compared to others. For this reason,
extracting useful information from video, i.e., the automated video surveillance
system has become a hot research issue. With this regard, video surveillance is
one of the advanced applications of a machine learning approach. In the security-
based application, identification of the human from the videos is an important
issue. The face pattern is the most widely used parameter to recognize a person.
A system with the ability to gather information about the presence of the same
person in a different frame of a video is highly demanding. There are several
methods of machine learning algorithm to track the movement of human and
identifying them. Dr K.Veera Swamy, Professorm ECE, VCE
ML Applications- Email Classification
and Spam Filtering
Suppose that; we purchased several things from an online shop several days
before. After a couple of days, you will notice that the related shopping websites
or services are recommended for you. Again, if you search something in google
therefore after your searching, the similar type of things are recommended for
you. This recommendation of products and services are the advance application of
machine learning technique . Several machine learning methods like supervised,
semi-supervised, unsupervised, reinforcement are used to develop these products
recommendation based system. This type of system also built with the
Dr K.Veera Swamy, Professorm ECE, VCE
incorporation of big data and ML technique.
ML Applications- Online Customer
Support
Recently almost all websites allow the customer to chat with the website
representative. However, not website has an executive. Basically, they develop a
chat-bot to chat with the customer to know their opinion. This is possible only for
the machine learning approach. It’s just a beauty of machine learning algorithm.
Social media is using the machine learning approach to create attractive and
splendid features, i.e. people you may know, suggestion, react options for their
users. These features are just an outcome of the machine learning technique. Do
you ever think of how they use the machine learning approach to engage you in
your social account? For example, Facebook continuously notices your activities
like with whom you chat, your likes, workplace, study place. And machine
learning always acts based on experience. So, Facebook gives you a suggestion
based on your activities. Dr K.Veera Swamy, Professorm ECE, VCE
ML Applications- Information retrieval
ML provides methods, techniques, and tools that can help in solving diagnostic
and prognostic problems in a variety of medical domains. It is being used for the
analysis of the importance of clinical parameters and of their combinations for
prognosis, e.g. prediction of disease progression, for the extraction of medical
knowledge for outcomes research, for therapy planning and support, and for
overall patient management.
Dr K.Veera Swamy, Professorm ECE, VCE
ML Applications- Travelling-Traffic Prediction
I am sure you hate traffic jams!!! And to solve some of these problems related
to traveling, Machine Learning is a big help. One of the common examples of
ML in traveling is Google Maps. The algorithm for Google Maps automatically
picks the best route from point A to point B, by relying on the projections of
different timeframes and keeping in mind various factors like traffic jams,
roadblocks, etc. Also, the names of various streets and locations are read in
Street View and then added to Google Maps for optimal accuracy.
ALVINN
Drives 70 mph on a public highway Predecessor of the Google car
https://www.youtube.com/watch?v=aaOB-ErYq6Y
Nissan Car
Dr K.Veera Swamy, Professorm ECE, VCE
Reference: https://data-flair.training/blogs/machine-learning-applications/
4. Internet
Dr K.Veera Swamy, Professorm ECE, VCE