Machine Learning
Motivation for Machine Learning
Contd.
• The conventional techniques may not be able to identify the process
completely, however we believe to construct a good and useful
approximation.
• These approximated patterns or regularities are the key factors of
machine learning
• Application of machine learning methods to large databases is called
data mining. Here a large volume of data is processed in order to
construct a simple model with high predictive accuracy.
Contd.
• “Models", are exposed to sets of new data, they adapt independently
and learn from earlier computations to interpret available data and
identify hidden patterns.
• ML enables computers and computing machines to search for and
identify hidden insights
• The factors responsible for resurging interest in ML are powerful and
affordable computational processing, continuously growing volumes of
huge data sets, and affordable data storage options
• ML also enables businesses to automate analysis, which was
traditionally done by humans. Using ML organizations can deliver
personalized services and differentiated products that precisely cater to
varying needs of the customers.
Use of ML in Business sectors
• the development of effective machine learning systems for
augmenting business sectors include
• Superior data preparation capabilities.
• Knowledge of basic and advanced algorithms.
• Scalability.
• Automation and iterative processes.
Applications of Machine
Learning
Contd.
• Machine learning is the process of programming computers to
optimize a performance criterion using example data or past
experience.
• We define a model up to some parameters, and learning is the
execution of a computer program to optimize the parameters of the
model using the training data or past experience.
• The model may be predictive to make predictions in the future, or
descriptive to gain knowledge from data, or both.
Contd.
• A machine learning algorithm usually follows a certain type of data and then uses the patterns
hidden in that data to answer more questions. For example showing a computer a series of
photographs, some of which say that "this is a horse" and some of which say "this is not a
horse".
• After this exercise, if you show some more photographs to the same computer, it will be on a
mission to identify which of those photographs are of a horse and which of those are not that
of a horse.
• Every correct and incorrect guess of the computer is added to its memory, which makes it
smarter in the longer run and enriches its learning over a period.
• Theory of statistics has its own significance in building mathematical models for machine
learning.
• Alongside, computer science contributes in developing algorithms to solve the optimization
problem, storing and processing massive data and also in giving efficient representation and
algorithmic solution for inference.
Learning associations
• Basket analysis is one of the applications of machine learning.
• An association rule is modelled among the products bought by customers.
• Cross selling or planning the combo offers.
• “If people who buy X typically also buy Y, and if there is a customer who
buys X and does not buy Y, he or she is a potential Y customer”.
• This information helps in cross selling or planning the combo offers.
• For example, a person who buys shoes, probably buy socks as well.
Contd.
• the interest is in learning a conditional probability of the form
• P(Y|X) where Y is the product which is likely to condition on X, which is the product
or the set of products which is known to be already purchased by the customer.
• In order to make a distinction among customers on this basis,
• one has to estimate P(Y|X, D) where D is the set of customer attributes, for
example, gender, age, marital status, and so on, assuming that we have access to this
information.
• With such an estimate, among the items corresponding to links to Web pages, one
can estimate the links a user is likely to click and use this information to download
such pages in advance for faster access.
Classification
• A credit is an amount of money loaned by a financial institution, say a
bank, to be paid back with interest, generally in installments. It is
significantly important for a bank to be able to predict the risk
associated with a loan well in advance.
• In credit scoring, the bank calculates the risk given the amount of
credit and the information about the customer.
• The customer information includes his income, savings, collaterals,
profession, age, past financial history etc.
• the aim is to infer a general rule coding the association between a
customer’s attributes and his risk.
Regression
• Predict the price of a used car:
• Input Attributes like brand, year, engine capacity, mileage, and other information’s,
normally need to be considered the output would be the predicted price.
• Let X denote the car attributes and Y be the price of the car.
• Collect a training data and the machine learning program fits a function to this
data to learn Y as a function of X.
• The problems where a result is a number are termed to be regression problems.
• Navigation of a Mobile robot, such as an autonomous car is another example of
regression wherein the output is the angle by which the steering wheel should be
turned at each time. Inputs in are received from the sensors on the car, such as a
video camera, GPS etc.
• Training data is to be collected by monitoring and recording the actions of a
human driver.
Origin of Machine Learning
Contd.
• The focus here is on iterative learning.
• Machines begin to adapt to new data that they are exposed to, over
a period. Based on the patterns and computations that are previously
created, machines learn to repeat decisions made in the past, in
similar situations.
• This aspect of machines' ability to learn from the existing patterns, is
now gaining huge momentum.
Few Applications
• Consider Google Car for instance, which is primarily built on the crux
of machine learning.
• Netflix and Amazon – an example of machine learning in everyday
life.
• Next, ML can also be combined with linguistic rules creation. by
Twitter, where you will know what customers say about you.
• Detect fraud in various industry sectors
Uses and Abuses
Success cases
How do Machines Learn
Learning Process
contd
• Computers have similar capabilities of short- and long-term recall
using hard disk drives, flash memory, and Random Access Memory
(RAM) in combination with a Central Processing Unit (CPU)
• Without a higher level of understanding, knowledge is limited
exclusively to recall
Abstraction and knowledge
representation
• Assigning meaning to stored data occurs during the abstraction
process, in which raw data comes to have a more abstract meaning
• During a machine's process of knowledge representation, the
computer summarizes stored raw data using a model, an explicit
description of the patterns within the data.
Model and Types
• Model representation takes on a life beyond the raw data
Types of Models
• Mathematical equations.
• Relational diagrams such as trees and graphs.
• Logical if/else rules.
• Groupings of data known as clusters.
• The learning task and data on hand inform model selection
• The process of fitting a model to a dataset is known as training
• When the model has been trained, the data is transformed into an abstract form that
summarizes the original information
Generalization
• The term generalization describes the process of turning abstracted knowledge
into a form that can be utilized for future action, on tasks that are similar, but not
identical, to those it has seen before.
• In generalization, the learner is tasked with limiting the patterns it discovers to
only those that will be most relevant to its future tasks.
• Eg:
• For example, suppose that a machine learning algorithm learned to identify faces by finding
two dark circles representing eyes, positioned above a straight line indicating a mouth.
• The algorithm might then have trouble with, or be biased against, faces that do not
conform to its model. Faces with glasses, turned at an angle, looking sideways, or with
various skin tones might not be detected by the algorithm. Similarly, it could be biased
toward faces with certain skin tones, face shapes, or other characteristics that do not
conform to its understanding of the world.
Factors to be considered
Bias
• Bias is a necessary evil associated with the abstraction and
generalization processes inherent in any learning task.
• Generalization process evaluates or measures the learner's success in
spite of its biases and use this information to inform additional
training if needed
• Models fail to perfectly generalize due to the problem of noise, a term
that describes unexplained or unexplainable variations in data
Noise Modeling
• Noisy data is caused by seemingly random events, such as
• Measurement error due to imprecise sensors
• Issues with human subjects, such as survey respondents reporting
• Data quality problems, including missing, null, truncated, incorrectly
• Phenomena that are so complex
• Trying to model noise is the basis of a problem called overfitting
• Noisy data is unexplainable by definition, attempting to explain the
noise will result in erroneous conclusions
• Efforts to explain the noise will also typically result in more complex
models that will miss the true pattern that the learner tries to identify.
• perform well during training, but does poorly during evaluation, is said
to be overfitted to the training dataset, as it does not generalize well to
the test dataset
Assessing the success of
learning
Model Evaluation Techniques
Metrics for evaluation of
classification
method
• Classification accuracy.
• Accuracy by class.
• Confusion matrix.
• Correlation Coefficient.
• Root Mean Squared Error.
Steps to apply machine learning
to data
Five-Step process
Machine Learning Process &
methods
Classification of Machine
Learning Algorithms
• Choosing the right machine learning algorithm depends on several
factors, including, but not limited to:
• data
• Size
• Quality
• Diversity
• as well as what answers businesses want to derive from that data.
• Additional considerations include
• accuracy, training time, parameters, data points and much more
Common and popular machine
learning algorithms
Contd.
• Reinforcement Learning is mainly used in navigation, robotics and
gaming.
• Actions that yield the best rewards are identified by algorithms that
use trial and error methods.
• The main aim in this kind of learning is to select the actions that
maximize the reward, within a specified time.
• There are three major components in reinforcement learning
• Namely
• the agent
• the actions and the environment.
Supervised learning
Contd.
• These algorithms are trained using labeled examples, in different scenarios, as an
input where the desired
• Outcome is already known. An equipment, for instance, could have data points
such as
• "F" and "R" where "F“ represents "failed" and "R" represents "runs".
• The learning algorithm will then compare the actual outcome with the accurate
outcome and flag an error, if there is any discrepancy.
• This method is commonly used in areas where historical data is used to predict
events that are likely to occur in the future.
• For instance, anticipate when a credit card transaction is likely to be fraudulent or
predict which insurance customers are likely to file their claims.
Contd.
Unsupervised learning
• This method of ML finds its application in areas where data has no historical
labels
• The system will not be provided with the "right answer" and the algorithm
should identify what is being shown.
• The main aim here is to analyze the data and identify a pattern and structure
within the available data set.
• Transactional data serves as a good source of data set for unsupervised learning.
• In the cases of unsupervised learning, we are provided with only the data,
without labels.
• The goal is to find the regularities in the input. The input space follows certain
patterns, our goal is to build a model to identify these patterns.
• Clustering, a method of statistical density estimation, where the aim is to find
clusters or groupings of input, does this job.
Contd.
• In the case of a company with a data of past customers along with the
demographic information
• The past transactions with the company and if the company wants to
see the distribution of the profile of its customers, to see what type of
customers frequently occur;
• The company may adopt a clustering model which allocate the
customers with similar in their attributes to the same group, providing
the company with natural groupings of its customers.
Contd.
• Some of the widely used techniques of unsupervised learning are:
• K-means clustering.
• Self-organizing maps.
• Value decomposition.
• Mapping of nearest neighbor.
Semi-supervised learning
Contd.
• This kind of learning is used and applied to the same kind of scenarios where
supervised learning is applicable.
• This technique uses both unlabeled and labeled data for training.
• A small set of labeled data, along with a large volume of unlabeled data is used,
as it takes less time, money and efforts to acquire unlabeled data.
• This type of machine learning is often used with methods, such as Regression,
classification and Prediction.
• The algorithmic methods which make assumptions about how to model the
unlabeled data, fall under this category
• The situations of image classification where there are large datasets with very
few labeled examples encourage us follow semi-supervised learning approaches.
Algorithms
• Regression Algorithms.
• Instance-based Algorithms.
• Regularization Algorithms.
• Decision Tree Algorithms.
• Bayesian Algorithms.
• Clustering Algorithms.
• Association Rule Learning Algorithms.
• Artificial Neural Network Algorithms.
• Deep Learning Algorithms.
• Dimensionality Reduction Algorithms.
• Ensemble Algorithms.
Reinforcement learning
• The output of the system is a sequence of actions
• what is important is the policy that is the sequence of correct actions
to reach the goal
• No such thing as the best action in any intermediate state; an action is
good if it is part of a good policy
• Assess the goodness of policies and learn from past good action
sequences to be able to generate a policy. Such learning methods are
called reinforcement learning algorithms