Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

IBM ICE (Innovation Centre for Education)

Welcome to:
Introduction to machine learning

9.1
Unit objectives IBM ICE (Innovation Centre for Education)
IBM Power Systems

After completing this unit, you should be able to:

• Understand the history of machine learning

• Understand the advantages and drawbacks of using machine learning

• Have an understanding of how machines do work

• Have an insight on the basic steps of machine learning

• Have knowledge on the different types of machine learning approaches


Introduction IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Computer adopts a systematic approach, an algorithm.


– Proven sequence of steps : transform the input to output.

• When the input data is not well defined, the model or algorithm cannot be predefined.

• Build a system by making it learn from the examples.


– Weather prediction.
– Person identification based on biometric.
Motivation for machine learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
Applications IBM ICE (Innovation Centre for Education)
IBM Power Systems
Machine learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Machine learning is a part of artificial intelligence rather than being a simple database
problem.

• It needs to learn from constantly changing environment.


Classification IBM ICE (Innovation Centre for Education)
IBM Power Systems
Regression IBM ICE (Innovation Centre for Education)
IBM Power Systems
The origin of machine learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
Time line of machine learning techniques IBM ICE (Innovation Centre for Education)
IBM Power Systems
Uses and abuses of machine learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
• Machines are still relatively limited in their ability to thoroughly understand a problem.

• Machines have pure intellectual horsepower without guidance.

• Needs a human intervention to motivate the analysis and turn the result into meaningful
action.

• Machine learning is highly successful when it augments with a system, rather than replacing
the specialized knowledge of a subject-matter expert.

• Machine learning assists medical doctors at the forefront of the fight to eradicate cancer,
assists engineers and programmers to create smarter homes and automobiles and helps
social scientists build knowledge of how societies function.

• It is employed in numerous businesses, scientific laboratories, hospitals, and government


organizations. Some machine learning algorithm is commonly employed among the
organizations which generate or aggregate data make sense of it.
How do machines learn? IBM ICE (Innovation Centre for Education)
IBM Power Systems
Abstraction and knowledge
representation IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Assigning meaning to stored data occurs during the abstraction process, in which raw data
comes to have a more abstract meaning.

• During a machines process of knowledge representation, the computer summarizes stored


raw data using a model, an explicit description of the patterns within the data.

• The model representation takes on a life beyond the raw data. It represents an idea greater
than the sum of its parts.

• There are many different types of models, for example,


– Mathematical equations.
– Relational diagrams such as trees and graphs.
– Logical if/else rules.
– Groupings of data known as clusters.
Generalization IBM ICE (Innovation Centre for Education)
IBM Power Systems

• The learning process is not complete until the learner is able to use its abstracted knowledge
for future action.

• Unless the production of abstractions is limited, the learner will be unable to proceed.

• It would be stuck where it started with a large pool of information, but no actionable insight.

• 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.

• Generalization is a somewhat vague process that is a bit difficult to describe.

• In generalization, the learner is tasked with limiting the patterns it discovers to only those that
will be most relevant to its future tasks.

• It is not feasible to reduce the number of patterns by examining them one-by-one and ranking
them by future utility.
Assessing the success of learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Weka machine learning workbench: Evaluation


– Training dataset.
– Supplied test set.
– Percentage split.
– Cross validation.
Steps to apply machine learning to data IBM ICE (Innovation Centre for Education)
IBM Power Systems
Input data and ML algorithm IBM ICE (Innovation Centre for Education)
IBM Power Systems

• The characteristics of input data.

• Understand the terminology that distinguishes among input datasets.


– The unit of observation is in the form of persons, objects or things, transactions, time points,
geographic regions, or measurements.

• Datasets that store the units of observation and their properties.

• Understand features and examples through real-world cases.

• Algorithms are categorized based on their purpose.


– For example, a predictive model is employed on the cases of tasks which involve, the prediction of
one value using other values in the dataset.

• Model the relationship between the target feature (the feature being predicted) and the other
features.
Machine learning methods IBM ICE (Innovation Centre for Education)
IBM Power Systems
Unsupervised learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
Semi-supervised learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
Clustering IBM ICE (Innovation Centre for Education)
IBM Power Systems
What are we looking for? IBM ICE (Innovation Centre for Education)
IBM Power Systems
Classification of machine learning
algorithms IBM ICE (Innovation Centre for Education)
IBM Power Systems
General ML architecture IBM ICE (Innovation Centre for Education)
IBM Power Systems

• As the predictive models are well instructed regarding what they need to learn and how they
are intended to learn it, the process of training a predictive model is known as supervised
learning.

• The often used supervised machine learning task of predicting which category an example
belongs to is known as classification.

• In the case of classification, the target feature to be predicted is a categorical feature known
as the class, and is divided into categories called levels.
Reinforcement learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• The output of the system is a sequence of actions.

• A single action is not important. What is important is the policy that is the sequence of correct
actions to reach the goal.

• There is 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.


Supervised learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• In the case of supervised learning, input data is termed as training data and it has a known
label uniquely mapping the data to a class.

• Here a model is prepared through the training process in which it is required to make
predictions and is corrected when those predictions are wrong.

• The process of training is continued until the model attains a satisfactory accuracy on the
training data.
Unsupervised learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Supervised learning, teaches a mapping from the input to an output where the correct values
are provided, by a supervisor.

• 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.
Semi-supervised learning IBM ICE (Innovation Centre for Education)
IBM Power Systems

• In the case of Semi-supervised learning input data termed as training data, consists of both
labeled and unlabeled collections of information.

• There is a desired prediction problem but the model must learn the structures to organize the
data as well as make predictions.
Regularization algorithms IBM ICE (Innovation Centre for Education)
IBM Power Systems

• This is an extension of regression methods, which penalizes models based on their


complexity, favoring simpler models with better generalization.

• Well known regularization algorithms are,


– Ridge regression.
– Least Absolute Shrinkage and Selection Operator (LASSO).
– Elastic net.
– Least-Angle Regression (LARS).
Clustering algorithms IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Clustering approaches group the data based on certain similarity of features.

• Clustering methods generally use centroid-based and hierarchal kind of modelling


approaches.

• Most of the methods tend to use the inherent structures in the data to best organize the data
into groups, considering the maximum similarity in the data.
Deep learning algorithms IBM ICE (Innovation Centre for Education)
IBM Power Systems

• Deep learning methods are a modern extension to artificial neural networks with better
efficiency.

• Deep learning methods are concerned with building much larger and more complex neural
networks and, as commented on above, many methods are concerned with semi-supervised
learning problems where large datasets contain very little labeled data.
Ensemble learning IBM ICE (Innovation Centre for Education)
IBM Power Systems
Matching data to an appropriate
algorithm IBM ICE (Innovation Centre for Education)
IBM Power Systems
Checkpoint (1 of 2) IBM ICE (Innovation Centre for Education)
IBM Power Systems

Multiple choice questions:

1. Which of the following will be Euclidean Distance between the two data point A(1,3) and
B(2,3)?
a) 1
b) 2
c) 4
d) 8

2. Which of the following value of K will have least leave-one-out cross validation accuracy?
a) 1NN
b) 3NN
c) 4NN
d) All have same leave one out error

3. Which of the following sentence is FALSE regarding regression?


a) It relates inputs to outputs.
b) It is used for prediction.
c) It may be used for interpretation.
d) It discovers causal relationships.
Checkpoint solutions(1 of 2) IBM ICE (Innovation Centre for Education)
IBM Power Systems

Multiple choice questions:

1. Which of the following will be Euclidean Distance between the two data point A(1,3) and
B(2,3)?
a) 1
b) 2
c) 4
d) 8

2. Which of the following value of K will have least leave-one-out cross validation accuracy?
a) 1NN
b) 3NN
c) 4NN
d) All have same leave one out error

3. Which of the following sentence is FALSE regarding regression?


a) It relates inputs to outputs.
b) It is used for prediction.
c) It may be used for interpretation.
d) It discovers causal relationships.
Checkpoint (2 of 2) IBM ICE (Innovation Centre for Education)
IBM Power Systems

Fill in the blanks:


1. __________ learning is used when you build component classifiers that are more accurate
and independent from each other.
2. ________ are supervised learning algorithms used for classification and regression
analysis.
3. ________ learning is a learning framework that has been introduced to analyze learning
algorithms and their statistical efficiency.
4. ________ methods extract the rules which efficiently represent the observed relationships
between variables in data.

True or False:
1. Designing and developing algorithms according to the behaviors based on empirical data
are known as machine learning. True/False
2. Sequence learning is a method of teaching and learning in a logical manner. True/False
3. Instance based learning algorithm is also referred as Lazy learning algorithm as they delay
the induction or generalization process until classification is performed. True/False
Checkpoint solutions (2 of 2) IBM ICE (Innovation Centre for Education)
IBM Power Systems

Fill in the blanks:


1. Ensemble learning is used when you build component classifiers that are more accurate
and independent from each other.
2. Support vector machine are supervised learning algorithms used for classification and
regression analysis.
3. Probably approximately correct learning is a learning framework that has been introduced
to analyze learning algorithms and their statistical efficiency.
4. Association rule learning methods extract the rules which efficiently represent the
observed relationships between variables in data.

True or False:
1. Designing and developing algorithms according to the behaviors based on empirical data
are known as machine learning. True
2. Sequence learning is a method of teaching and learning in a logical manner. True
3. Instance based learning algorithm is also referred as Lazy learning algorithm as they delay
the induction or generalization process until classification is performed. True
Question bank IBM ICE (Innovation Centre for Education)
IBM Power Systems

Two marks questions:

1. Define machine learning.


2. What is meant by learning by association? Illustrate.
3. What is meant by abstraction? Illustrate.
4. What is meant by generalization? Give an example.

Four marks questions:

1. What are the pros and cons of machine learning algorithms?


2. What are the metrics to be considered to evaluate any machine learning algorithm? Explain.
3. Compare supervised learning to unsupervised learning.
4. Define reinforcement learning. Illustrate.

Eight marks questions:

1. What are the significant reasons for having adapting Machine Learning in Industry sectors?
Discuss.
2. Describe the procedure of machine learning with a block diagram.
Unit summary IBM ICE (Innovation Centre for Education)
IBM Power Systems

Having completed this unit you should be able to:

• Understand the history of machine learning


• Understand the advantages and drawbacks of using machine learning
• Have an understanding of how machines do work
• Have an insight on the basic steps of machine learning
• Have knowledge on the different types of machine learning approaches

You might also like