SlideShare a Scribd company logo
Machine Learning with Python
Topics to be covered…..
• Introduction to Machine Learning
• Supervised Learning
• Unsupervised Learning
• Python libraries for Machine Learning
ML
Machine Learning (ML) is an automated learning
with little or no human intervention. It involves
programming computers so that they learn from
the available inputs. The main purpose of
machine learning is to explore and construct
algorithms that can learn from the previous data
and make predictions on new input data.
What is Machine Learning?
• The capability of Artificial Intelligence systems
to learn by extracting patterns from data is
known as Machine Learning.
• Machine Learning is an idea to learn from
examples and experience, without being
explicitly programmed. Instead of writing code,
you feed data to the generic algorithm, and it
builds logic based on the data given.
Introduction to Machine Learning
• Python is a popular platform used for research
and development of production systems. It is
a vast language with number of modules,
packages and libraries that provides multiple
ways of achieving a task.
• Python and its libraries like NumPy, Pandas,
SciPy, Scikit-Learn, Matplotlib are used in data
science and data analysis. They are also
extensively used for creating scalable machine
learning algorithms.
• Python implements popular machine learning
techniques such as Classification, Regression,
Recommendation, and Clustering.
• Python offers ready-made framework for
performing data mining tasks on large
volumes of data effectively in lesser time
Growth of Machine Learning
• Machine learning is preferred approach to
– Speech recognition, Natural language processing
– Computer vision
– Medical outcomes analysis
– Robot control
– Computational biology
• This trend is accelerating
– Improved machine learning algorithms
– Improved data capture, networking, faster computers
– Software too complex to write by hand
– New sensors / IO devices
– Demand for self-customization to user, environment
– It turns out to be difficult to extract knowledge from human expertsfailure of
expert systems in the 1980’s.
Types of Learning
• Supervised (inductive) learning
– Training data includes desired outputs
• Unsupervised learning
– Training data does not include desired outputs
• Reinforcement learning
– Rewards from sequence of actions
• Similarly, there are four categories of machine
learning algorithms as shown below:
• Supervised learning algorithm
• Unsupervised learning algorithm
• Semi-supervised learning algorithm
• Reinforcement learning algorithm
Supervised Learning
• Supervised learning, as the name indicates, has
the presence of a supervisor as a teacher.
Basically supervised learning is when we teach or
train the machine using data that is well labeled.
Which means some data is already tagged with
the correct answer. After that, the machine is
provided with a new set of examples(data) so
that the supervised learning algorithm analyses
the training data(set of training examples) and
produces a correct outcome from labeled data.
• For instance, suppose you are given a basket filled
with different kinds of fruits. Now the first step is
to train the machine with all different fruits one by
one like this:
If the shape of the object is rounded and has a depression at the top, is
red in color, then it will be labeled as –Apple.
If the shape of the object is a long curving cylinder having Green-
Yellow color, then it will be labeled as –Banana.
• Now suppose after training the data, you have
given a new separate fruit, say Banana from
the basket, and asked to identify it.
•Since the machine has already learned the things from previous
data and this time has to use it wisely. It will first classify the fruit
with its shape and color and would confirm the fruit name as
BANANA and put it in the Banana category. Thus the machine
learns the things from training data(basket containing fruits) and
then applies the knowledge to test data(new fruit).
Supervised learning is classified into two categories
of algorithms:
• Classification: A classification problem is when the
output variable is a category, such as “Red” or
“blue” or “disease” and “no disease”.
• Regression: A regression problem is when the
output variable is a real value, such as “dollars” or
“weight”.
Supervised learning deals with or learns with “labeled” data. This
implies that some data is already tagged with the correct answer.
Types:-
Regression
Logistic Regression
Classification
Naive Bayes Classifiers
K-NN (k nearest neighbors)
Decision Trees
Support Vector Machine
Advantages:-
• Supervised learning allows collecting data and produces data
output from previous experiences.
• Helps to optimize performance criteria with the help of experience.
• Supervised machine learning helps to solve various types of real-
world computation problems.
Disadvantages:-
• Classifying big data can be challenging.
• Training for supervised learning needs a lot of computation time.
So, it requires a lot of time.
Unsupervised learning
• Unsupervised learning is the training of a machine using
information that is neither classified nor labeled and
allowing the algorithm to act on that information without
guidance. Here the task of the machine is to group
unsorted information according to similarities, patterns,
and differences without any prior training of data.
• Unlike supervised learning, no teacher is provided that
means no training will be given to the machine. Therefore
the machine is restricted to find the hidden structure in
unlabeled data by itself.
For instance, suppose it is given an image having
both dogs and cats which it has never seen.
Thus the machine has no idea about the features of dogs and cats so we can’t
categorize it as ‘dogs and cats ‘. But it can categorize them according to their
similarities, patterns, and differences, i.e., we can easily categorize the above picture
into two parts. The first may contain all pics having dogs in them and the second part
may contain all pics having cats in them. Here you didn’t learn anything before,
which means no training data or examples.
It allows the model to work on its own to discover patterns and information that was
previously undetected. It mainly deals with unlabelled data.
Unsupervised learning is classified into two categories
of algorithms:
• Clustering: A clustering problem is where you want
to discover the inherent groupings in the data, such
as grouping customers by purchasing behavior.
• Association: An association rule learning problem is
where you want to discover rules that describe
large portions of your data, such as people that buy
X also tend to buy Y
Types of Unsupervised Learning:-
Clustering
• Exclusive (partitioning)
• Agglomerative
• Overlapping
• Probabilistic
Clustering Types:-
• Hierarchical clustering
• K-means clustering
• Principal Component Analysis
• Singular Value Decomposition
• Independent Component Analysis
Supervised vs. Unsupervised Machine
Learning
Parameters
Supervised machine
learning
Unsupervised
machine learning
Input Data
Algorithms are trained
using labeled data.
Algorithms are used
against data that is not
labeled
Computational
Complexity
Simpler method
Computationally
complex
Accuracy Highly accurate Less accurate
Reinforcement Learning
Reinforcement learning is an area of Machine Learning. It is
about taking suitable action to maximize reward in a particular
situation. It is employed by various software and machines to find
the best possible behavior or path it should take in a specific
situation. Reinforcement learning differs from supervised learning
in a way that in supervised learning the training data has the answer
key with it so the model is trained with the correct answer itself
whereas in reinforcement learning, there is no answer but the
reinforcement agent decides what to do to perform the given task. In
the absence of a training dataset, it is bound to learn from its
experience.
• Example: The problem is as follows: We have an agent and a reward, with
many hurdles in between. The agent is supposed to find the best possible path
to reach the reward. The following problem explains the problem more
easily.
The above image shows the robot, diamond, and fire. The goal of the robot is to
get the reward that is the diamond and avoid the hurdles that are fired. The robot
learns by trying all the possible paths and then choosing the path which gives him
the reward with the least hurdles. Each right step will give the robot a reward and
each wrong step will subtract the reward of the robot. The total reward will be
calculated when it reaches the final reward that is the diamond.
Main points in Reinforcement learning –
• Input: The input should be an initial state from which the model
will start
• Output: There are many possible outputs as there are a variety of
solutions to a particular problem
• Training: The training is based upon the input, The model will
return a state and the user will decide to reward or punish the
model based on its output.
• The model keeps continues to learn.
• The best solution is decided based on the maximum reward.
Types of Reinforcement: There are two types of
Reinforcement:
• Positive
Positive Reinforcement is defined as when an event, occurs due to a particular behaviour,
increases the strength and the frequency of the behaviour. In other words, it has a positive effect
on behaviour. Advantages of reinforcement learning are:
– Maximizes Performance
– Sustain Change for a long period of time
– Too much Reinforcement can lead to an overload of states which can diminish the results
• Negative
Negative Reinforcement is defined as strengthening of behaviour because a negative condition is
stopped or avoided. Advantages of reinforcement learning:
– Increases Behaviour
– Provide defiance to a minimum standard of performance
– It Only provides enough to meet up the minimum behaviour
Libraries and Packages
• To understand machine learning, you need to have basic
knowledge of Python programming. In addition, there are a
number of libraries and packages generally used in
performing various machine learning tasks as listed below:
– numpy - is used for its N-dimensional array objects
– pandas – is a data analysis library that includes dataframes
– matplotlib – is 2D plotting library for creating graphs and plots
– scikit-learn - the algorithms used for data analysis and data mining
tasks
– seaborn – a data visualization library based on matplotlib

More Related Content

Similar to machine-learning-with-python usage in.ppt (20)

PPTX
AI_06_Machine Learning.pptx
Yousef Aburawi
 
PPTX
Machine Learning PPT BY RAVINDRA SINGH KUSHWAHA B.TECH(IT) CHAUDHARY CHARAN S...
RavindraSinghKushwah1
 
PDF
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
Guru Nanak Technical Institutions
 
PPTX
Mal8iiiiiiiiiiiiiiiii8iiiiii Unit-I.pptx
KalpeshMahajan23
 
PDF
An Introduction to Machine Learning
Vedaj Padman
 
PPTX
Machine learning
Abrar ali
 
PPTX
Supervised learning and unsupervised learning
ArunakumariAkula1
 
PPTX
types of learningyjhjfhnjfnfnhnnnnn.pptx
RoselinLourd
 
PPTX
Introduction to Machine Learning
KmPooja4
 
PPTX
Machine learning 11.pptx
VishalKumar585848
 
PPTX
Machine Learning for AIML course UG.pptx
JohnWilliam111370
 
PPTX
3171617_introduction_applied machine learning.pptx
jainyshah20
 
PPTX
Machine learning
MaedehDelparish
 
PPTX
Unsupervised & Supervised learning Strategies in detail.pptx
truptikulkarni2066
 
PPTX
chapter Three artificial intelligence 1.pptx
gadisaadamu101
 
PDF
machinecanthink-160226155704.pdf
PranavPatil822557
 
PPTX
Machine Can Think
Rahul Jaiman
 
PPTX
unit 1.2 supervised learning.pptx
Dr.Shweta
 
PPTX
Introduction on artificial Intelligence and Machine Learning
krishna272255
 
PPTX
Machine learning(UNIT 4)
Dr. SURBHI SAROHA
 
AI_06_Machine Learning.pptx
Yousef Aburawi
 
Machine Learning PPT BY RAVINDRA SINGH KUSHWAHA B.TECH(IT) CHAUDHARY CHARAN S...
RavindraSinghKushwah1
 
22PCOAM16_ML_Unit 1 notes & Question Bank with answers.pdf
Guru Nanak Technical Institutions
 
Mal8iiiiiiiiiiiiiiiii8iiiiii Unit-I.pptx
KalpeshMahajan23
 
An Introduction to Machine Learning
Vedaj Padman
 
Machine learning
Abrar ali
 
Supervised learning and unsupervised learning
ArunakumariAkula1
 
types of learningyjhjfhnjfnfnhnnnnn.pptx
RoselinLourd
 
Introduction to Machine Learning
KmPooja4
 
Machine learning 11.pptx
VishalKumar585848
 
Machine Learning for AIML course UG.pptx
JohnWilliam111370
 
3171617_introduction_applied machine learning.pptx
jainyshah20
 
Machine learning
MaedehDelparish
 
Unsupervised & Supervised learning Strategies in detail.pptx
truptikulkarni2066
 
chapter Three artificial intelligence 1.pptx
gadisaadamu101
 
machinecanthink-160226155704.pdf
PranavPatil822557
 
Machine Can Think
Rahul Jaiman
 
unit 1.2 supervised learning.pptx
Dr.Shweta
 
Introduction on artificial Intelligence and Machine Learning
krishna272255
 
Machine learning(UNIT 4)
Dr. SURBHI SAROHA
 

Recently uploaded (20)

PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Day2 B2 Best.pptx
helenjenefa1
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Design Thinking basics for Engineers.pdf
CMR University
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
MRRS Strength and Durability of Concrete
CivilMythili
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Ad

machine-learning-with-python usage in.ppt

  • 2. Topics to be covered….. • Introduction to Machine Learning • Supervised Learning • Unsupervised Learning • Python libraries for Machine Learning
  • 3. ML Machine Learning (ML) is an automated learning with little or no human intervention. It involves programming computers so that they learn from the available inputs. The main purpose of machine learning is to explore and construct algorithms that can learn from the previous data and make predictions on new input data.
  • 4. What is Machine Learning? • The capability of Artificial Intelligence systems to learn by extracting patterns from data is known as Machine Learning. • Machine Learning is an idea to learn from examples and experience, without being explicitly programmed. Instead of writing code, you feed data to the generic algorithm, and it builds logic based on the data given.
  • 5. Introduction to Machine Learning • Python is a popular platform used for research and development of production systems. It is a vast language with number of modules, packages and libraries that provides multiple ways of achieving a task. • Python and its libraries like NumPy, Pandas, SciPy, Scikit-Learn, Matplotlib are used in data science and data analysis. They are also extensively used for creating scalable machine learning algorithms.
  • 6. • Python implements popular machine learning techniques such as Classification, Regression, Recommendation, and Clustering. • Python offers ready-made framework for performing data mining tasks on large volumes of data effectively in lesser time
  • 7. Growth of Machine Learning • Machine learning is preferred approach to – Speech recognition, Natural language processing – Computer vision – Medical outcomes analysis – Robot control – Computational biology • This trend is accelerating – Improved machine learning algorithms – Improved data capture, networking, faster computers – Software too complex to write by hand – New sensors / IO devices – Demand for self-customization to user, environment – It turns out to be difficult to extract knowledge from human expertsfailure of expert systems in the 1980’s.
  • 8. Types of Learning • Supervised (inductive) learning – Training data includes desired outputs • Unsupervised learning – Training data does not include desired outputs • Reinforcement learning – Rewards from sequence of actions
  • 9. • Similarly, there are four categories of machine learning algorithms as shown below: • Supervised learning algorithm • Unsupervised learning algorithm • Semi-supervised learning algorithm • Reinforcement learning algorithm
  • 10. Supervised Learning • Supervised learning, as the name indicates, has the presence of a supervisor as a teacher. Basically supervised learning is when we teach or train the machine using data that is well labeled. Which means some data is already tagged with the correct answer. After that, the machine is provided with a new set of examples(data) so that the supervised learning algorithm analyses the training data(set of training examples) and produces a correct outcome from labeled data.
  • 11. • For instance, suppose you are given a basket filled with different kinds of fruits. Now the first step is to train the machine with all different fruits one by one like this: If the shape of the object is rounded and has a depression at the top, is red in color, then it will be labeled as –Apple. If the shape of the object is a long curving cylinder having Green- Yellow color, then it will be labeled as –Banana.
  • 12. • Now suppose after training the data, you have given a new separate fruit, say Banana from the basket, and asked to identify it. •Since the machine has already learned the things from previous data and this time has to use it wisely. It will first classify the fruit with its shape and color and would confirm the fruit name as BANANA and put it in the Banana category. Thus the machine learns the things from training data(basket containing fruits) and then applies the knowledge to test data(new fruit).
  • 13. Supervised learning is classified into two categories of algorithms: • Classification: A classification problem is when the output variable is a category, such as “Red” or “blue” or “disease” and “no disease”. • Regression: A regression problem is when the output variable is a real value, such as “dollars” or “weight”.
  • 14. Supervised learning deals with or learns with “labeled” data. This implies that some data is already tagged with the correct answer. Types:- Regression Logistic Regression Classification Naive Bayes Classifiers K-NN (k nearest neighbors) Decision Trees Support Vector Machine
  • 15. Advantages:- • Supervised learning allows collecting data and produces data output from previous experiences. • Helps to optimize performance criteria with the help of experience. • Supervised machine learning helps to solve various types of real- world computation problems. Disadvantages:- • Classifying big data can be challenging. • Training for supervised learning needs a lot of computation time. So, it requires a lot of time.
  • 16. Unsupervised learning • Unsupervised learning is the training of a machine using information that is neither classified nor labeled and allowing the algorithm to act on that information without guidance. Here the task of the machine is to group unsorted information according to similarities, patterns, and differences without any prior training of data. • Unlike supervised learning, no teacher is provided that means no training will be given to the machine. Therefore the machine is restricted to find the hidden structure in unlabeled data by itself.
  • 17. For instance, suppose it is given an image having both dogs and cats which it has never seen. Thus the machine has no idea about the features of dogs and cats so we can’t categorize it as ‘dogs and cats ‘. But it can categorize them according to their similarities, patterns, and differences, i.e., we can easily categorize the above picture into two parts. The first may contain all pics having dogs in them and the second part may contain all pics having cats in them. Here you didn’t learn anything before, which means no training data or examples. It allows the model to work on its own to discover patterns and information that was previously undetected. It mainly deals with unlabelled data.
  • 18. Unsupervised learning is classified into two categories of algorithms: • Clustering: A clustering problem is where you want to discover the inherent groupings in the data, such as grouping customers by purchasing behavior. • Association: An association rule learning problem is where you want to discover rules that describe large portions of your data, such as people that buy X also tend to buy Y
  • 19. Types of Unsupervised Learning:- Clustering • Exclusive (partitioning) • Agglomerative • Overlapping • Probabilistic Clustering Types:- • Hierarchical clustering • K-means clustering • Principal Component Analysis • Singular Value Decomposition • Independent Component Analysis
  • 20. Supervised vs. Unsupervised Machine Learning Parameters Supervised machine learning Unsupervised machine learning Input Data Algorithms are trained using labeled data. Algorithms are used against data that is not labeled Computational Complexity Simpler method Computationally complex Accuracy Highly accurate Less accurate
  • 21. Reinforcement Learning Reinforcement learning is an area of Machine Learning. It is about taking suitable action to maximize reward in a particular situation. It is employed by various software and machines to find the best possible behavior or path it should take in a specific situation. Reinforcement learning differs from supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task. In the absence of a training dataset, it is bound to learn from its experience.
  • 22. • Example: The problem is as follows: We have an agent and a reward, with many hurdles in between. The agent is supposed to find the best possible path to reach the reward. The following problem explains the problem more easily. The above image shows the robot, diamond, and fire. The goal of the robot is to get the reward that is the diamond and avoid the hurdles that are fired. The robot learns by trying all the possible paths and then choosing the path which gives him the reward with the least hurdles. Each right step will give the robot a reward and each wrong step will subtract the reward of the robot. The total reward will be calculated when it reaches the final reward that is the diamond.
  • 23. Main points in Reinforcement learning – • Input: The input should be an initial state from which the model will start • Output: There are many possible outputs as there are a variety of solutions to a particular problem • Training: The training is based upon the input, The model will return a state and the user will decide to reward or punish the model based on its output. • The model keeps continues to learn. • The best solution is decided based on the maximum reward.
  • 24. Types of Reinforcement: There are two types of Reinforcement: • Positive Positive Reinforcement is defined as when an event, occurs due to a particular behaviour, increases the strength and the frequency of the behaviour. In other words, it has a positive effect on behaviour. Advantages of reinforcement learning are: – Maximizes Performance – Sustain Change for a long period of time – Too much Reinforcement can lead to an overload of states which can diminish the results • Negative Negative Reinforcement is defined as strengthening of behaviour because a negative condition is stopped or avoided. Advantages of reinforcement learning: – Increases Behaviour – Provide defiance to a minimum standard of performance – It Only provides enough to meet up the minimum behaviour
  • 25. Libraries and Packages • To understand machine learning, you need to have basic knowledge of Python programming. In addition, there are a number of libraries and packages generally used in performing various machine learning tasks as listed below: – numpy - is used for its N-dimensional array objects – pandas – is a data analysis library that includes dataframes – matplotlib – is 2D plotting library for creating graphs and plots – scikit-learn - the algorithms used for data analysis and data mining tasks – seaborn – a data visualization library based on matplotlib