SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Machine learning intro
The only limit to AI is human imagination. - Chris Duffey
By : Anas Jamil
Mar - 2019
Agenda
1- AI & ML & DL.
2- Machine learning (ML) introduction.
3- Types of Machine learning.
4- ML data types.
5- Working with missing data
6- Model performance (fitting)
AI & ML & DL introduction.
Artificial Intelligence (AI) : It is the study of how to train the computers so that computers can do things
which at present human can do. -www.geeksforgeeks.org-
Machine learning (ML) :Is the scientific study of algorithms and statistical models that computer systems
use to perform a specific task without using explicit instructions. -wikipedia-
Deep learning (DL): is an artificial intelligence function that imitates the workings of the human brain in
processing data and creating patterns for use in decision making.
What is Machine Learning?
“Learning is any process by which a system improves performance from
experience.” - Herbert Simon
Some use cases: We ML when:
• Human expertise does not exist (navigating on Mars)
• Humans can’t explain their expertise (speech recognition)
• Models are based on huge amounts of data (genomics).
Machine learning (ML)
1- Supervised (inductive/class driven) learning
Supervised learning: is the machine learning task of learning a function that maps an input to an output
based on example input-output pairs.
Supervised learning: is where you have input variables (x) and an output variable (Y) and you use an
algorithm to learn the mapping function from the input to the output.
Y = f(X)
The goal is to approximate the mapping function so well that when you have new input data (x) that you
can predict the output variables (Y) for that data.
It is called supervised learning because the process of an algorithm learning from the training dataset can
be thought of as a teacher supervising the learning process.
Supervised learning terms:
Class, Target, Label
Attribute, Feature
Labeled data, dataset,
Sample data
Sample
Example
Record
Row
Instance
observation
Supervised learning:
Supervised learning algorithm types:
1- Regression: It is a Supervised Learning task where output is having continuous value.(Numeric output )
Ex: how much home worth.
2- Classifications: It is a Supervised Learning task where output is having defined labels(discrete value).
A- Binary classification: Yes/No
Ex: Spam email?
B- Multi-classes: One out of several outputs.
Ex:What is the weather?
Sample of algorithms : Support Vector Machine (SVM), Random Forest, Linear Regression, Decision Trees
2-Unsupervised (data driven) learning
Training data does not include desired outputs.
Unsupervised learning: is very much the opposite of supervised learning. It features no labels. Instead,
our algorithm would be fed a lot of data and given the tools to understand the properties of the data. From
there, it can learn to group, cluster, and/or organize the data in a way such that a human (or other
intelligent algorithm) can come in and make sense of the newly organized data.
Unsupervised learning
Unsupervised learning 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.
Unsupervised learning: Dimensionality Reduction (DR)
There are two components of dimensionality reduction:
Feature extraction: This reduces the data in a high dimensional space to a lower dimension space,
i.e. a space with lesser no. of dimensions.
a+b+c+d = e
ab+c+d = e
Feature selection: In this, we try to find a subset of the original set of features, to get a smaller subset
which can be used to model the problem
c = 0
Sample of algorithms : FastText alg, BlazingText alg, Principal component analysis (PCA)
3- Reinforcement learning (RL)
It is about taking suitable action to maximize reward in a particular situation.
3- Reinforcement learning (RL)
Types of Reinforcement: There are two types of Reinforcement:
1- Positive: Positive Reinforcement is defined as when an event, occurs due to a particular
behavior, increases the strength and the frequency of the behavior. In other words it has a positive
effect.
2-Negative: Negative Reinforcement is defined as strengthening of a behavior because a negative
condition is stopped or avoided.
Use Cases of RL : Real-time decisions , Game AI, Robo navigation, auto drive cars
Data types from ML perspectives
1- Numerical Data
2- Categorical Data
3- Time Series Data
4- Text
1- Numerical Data:
Numerical data is any data where data points are exact numbers. Statisticians also might call numerical
data, quantitative data. This data has meaning as a measurement such as house prices.
2- Categorical Data
Categorical data represents characteristics, such as a hockey player’s positions.
Categorical data can take numerical values. For example, maybe we would use 1 for colour red and 2 for
blue. But these numbers don’t have a mathematical meaning.
3- Time Series Data
Time series data is a sequence of numbers collected at regular intervals over some period of time. It is
very important, especially in particular fields like finance. Time series data has a temporal value attached
to it, so this would be something like a date or a timestamp that you can look for trends in time.
4- Text
Text data is basically just words. A lot of the time the first thing that you do with text is you turn it into
numbers using some interesting functions like the bag of words formulation.
We can use stemming, lowercase functions .. etc
4- Text
This is working not disappointed
This is not working. disappointed
Tokenization :
[ ‘disappointed’, ’is’, ’not’, ’working’, ’this’ ]
4- Text
4- Text
Orthogonal sparse bigram (OSB) :
5- Working with missing data
For row have a missing values you can :
1- Delete the row (if data is not related).
2- Impute missing data:
A- if data is related to each other you can calculate the mean for that column.
B- if data is independent you can pick data from another row.
C-if data is related to timestamp:
1- interpolation
2- fill backward
3- fill forward
5- Working with missing data
5- Working with missing data
5- Working with missing data
5- Working with missing data
5- Working with missing data
5- Working with missing data
5- Working with missing data
Some useful lib for python:
1-Numpy : Mathematical function for optimize large data
2- Pandas : Data analyzing and modeling & reading
3- Matplotlib : Plotting library for visualize the data
6- Model performance (fitting)
Relationship between input and output could be:
1- Liner
2- non-liner
Knowing this relation will help in using algorithm and choose the attributes needed in
predict function
6- Model performance (fitting)
1- Underfitting:
When: Poor performance in testing set , poor in training set
Why: Feature is not enough to capture the relationship between input and output
How : Add more rows , or add more features, optimize the hyperparameters
2- Overfitting:
When: Poor performance in testing set , Good in training set
Why: Model memories the data it has seen and unable to generalize it on unseen data.
How: Removing complex feature and optimize the hyperparameters
3- Balanced:
Good performance in testing set , Poor in training set
Regression model performance
Common Techniques for evaluating performance:
Visually observe using Plots
Residual Histograms (negative less than positive)
Evaluate with Metrics like Root Mean Square Error (RMSE)
Binary & multi-class model performance
Common Techniques for evaluating performance:
Visually observe using Plots
Confusion Matrix
Binary model performance (SKLearn)
References:
https://docs.aws.amazon.com/machine-learning/index.html

Weitere ähnliche Inhalte

Was ist angesagt?

Machine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and TechniquesMachine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and Techniques
Rui Pedro Paiva
 
Machine Learning Course | Edureka
Machine Learning Course | EdurekaMachine Learning Course | Edureka
Machine Learning Course | Edureka
Edureka!
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Simplilearn
 

Was ist angesagt? (20)

Machine learning
Machine learningMachine learning
Machine learning
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Automatic Machine Learning, AutoML
Automatic Machine Learning, AutoMLAutomatic Machine Learning, AutoML
Automatic Machine Learning, AutoML
 
Machine learning (ML) and natural language processing (NLP)
Machine learning (ML) and natural language processing (NLP)Machine learning (ML) and natural language processing (NLP)
Machine learning (ML) and natural language processing (NLP)
 
Introduction to-machine-learning
Introduction to-machine-learningIntroduction to-machine-learning
Introduction to-machine-learning
 
Machine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and TechniquesMachine Learning: Applications, Process and Techniques
Machine Learning: Applications, Process and Techniques
 
Module 2: Machine Learning Deep Dive
Module 2:  Machine Learning Deep DiveModule 2:  Machine Learning Deep Dive
Module 2: Machine Learning Deep Dive
 
Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning
 
ML Basics
ML BasicsML Basics
ML Basics
 
Machine Learning Course | Edureka
Machine Learning Course | EdurekaMachine Learning Course | Edureka
Machine Learning Course | Edureka
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World Applications
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DS
 
CatBoost intro
CatBoost   introCatBoost   intro
CatBoost intro
 
Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?Lecture 1: What is Machine Learning?
Lecture 1: What is Machine Learning?
 
Statistics vs machine learning
Statistics vs machine learningStatistics vs machine learning
Statistics vs machine learning
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
MACHINE LEARNING PPT(ML) rohit.pptx
MACHINE LEARNING  PPT(ML) rohit.pptxMACHINE LEARNING  PPT(ML) rohit.pptx
MACHINE LEARNING PPT(ML) rohit.pptx
 

Ähnlich wie Machine learning introduction

Machine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptxMachine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptx
iaeronlineexm
 
machinecanthink-160226155704.pdf
machinecanthink-160226155704.pdfmachinecanthink-160226155704.pdf
machinecanthink-160226155704.pdf
PranavPatil822557
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
notes as .ppt
notes as .pptnotes as .ppt
notes as .ppt
butest
 

Ähnlich wie Machine learning introduction (20)

Machine Learning - Deep Learning
Machine Learning - Deep LearningMachine Learning - Deep Learning
Machine Learning - Deep Learning
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Machine Learning Basics
Machine Learning BasicsMachine Learning Basics
Machine Learning Basics
 
introduction to machine learning
introduction to machine learningintroduction to machine learning
introduction to machine learning
 
Machine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptxMachine Learning with Python- Methods for Machine Learning.pptx
Machine Learning with Python- Methods for Machine Learning.pptx
 
Chapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptxChapter 05 Machine Learning.pptx
Chapter 05 Machine Learning.pptx
 
Introduction to Datamining Concept and Techniques
Introduction to Datamining Concept and TechniquesIntroduction to Datamining Concept and Techniques
Introduction to Datamining Concept and Techniques
 
Machine learning-in-details-with-out-python-code
Machine learning-in-details-with-out-python-codeMachine learning-in-details-with-out-python-code
Machine learning-in-details-with-out-python-code
 
Introduction to data science.pdf
Introduction to data science.pdfIntroduction to data science.pdf
Introduction to data science.pdf
 
Self Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docxSelf Study Business Approach to DS_01022022.docx
Self Study Business Approach to DS_01022022.docx
 
Data Science as a Career and Intro to R
Data Science as a Career and Intro to RData Science as a Career and Intro to R
Data Science as a Career and Intro to R
 
Artificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptxArtificial intyelligence and machine learning introduction.pptx
Artificial intyelligence and machine learning introduction.pptx
 
machinecanthink-160226155704.pdf
machinecanthink-160226155704.pdfmachinecanthink-160226155704.pdf
machinecanthink-160226155704.pdf
 
Data analytcis-first-steps
Data analytcis-first-stepsData analytcis-first-steps
Data analytcis-first-steps
 
Machine Can Think
Machine Can ThinkMachine Can Think
Machine Can Think
 
Machine Learning Contents.pptx
Machine Learning Contents.pptxMachine Learning Contents.pptx
Machine Learning Contents.pptx
 
machine learning basic-1.pptx
machine learning basic-1.pptxmachine learning basic-1.pptx
machine learning basic-1.pptx
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
notes as .ppt
notes as .pptnotes as .ppt
notes as .ppt
 
Analysis using r
Analysis using rAnalysis using r
Analysis using r
 

Kürzlich hochgeladen

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 

Kürzlich hochgeladen (20)

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
ELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptxELKO dropshipping via API with DroFx.pptx
ELKO dropshipping via API with DroFx.pptx
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

Machine learning introduction

  • 1. Machine learning intro The only limit to AI is human imagination. - Chris Duffey By : Anas Jamil Mar - 2019
  • 2. Agenda 1- AI & ML & DL. 2- Machine learning (ML) introduction. 3- Types of Machine learning. 4- ML data types. 5- Working with missing data 6- Model performance (fitting)
  • 3. AI & ML & DL introduction. Artificial Intelligence (AI) : It is the study of how to train the computers so that computers can do things which at present human can do. -www.geeksforgeeks.org- Machine learning (ML) :Is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions. -wikipedia- Deep learning (DL): is an artificial intelligence function that imitates the workings of the human brain in processing data and creating patterns for use in decision making.
  • 4.
  • 5. What is Machine Learning? “Learning is any process by which a system improves performance from experience.” - Herbert Simon Some use cases: We ML when: • Human expertise does not exist (navigating on Mars) • Humans can’t explain their expertise (speech recognition) • Models are based on huge amounts of data (genomics).
  • 7.
  • 8. 1- Supervised (inductive/class driven) learning Supervised learning: is the machine learning task of learning a function that maps an input to an output based on example input-output pairs. Supervised learning: is where you have input variables (x) and an output variable (Y) and you use an algorithm to learn the mapping function from the input to the output. Y = f(X) The goal is to approximate the mapping function so well that when you have new input data (x) that you can predict the output variables (Y) for that data. It is called supervised learning because the process of an algorithm learning from the training dataset can be thought of as a teacher supervising the learning process.
  • 9. Supervised learning terms: Class, Target, Label Attribute, Feature Labeled data, dataset, Sample data Sample Example Record Row Instance observation
  • 11. Supervised learning algorithm types: 1- Regression: It is a Supervised Learning task where output is having continuous value.(Numeric output ) Ex: how much home worth. 2- Classifications: It is a Supervised Learning task where output is having defined labels(discrete value). A- Binary classification: Yes/No Ex: Spam email? B- Multi-classes: One out of several outputs. Ex:What is the weather? Sample of algorithms : Support Vector Machine (SVM), Random Forest, Linear Regression, Decision Trees
  • 12. 2-Unsupervised (data driven) learning Training data does not include desired outputs. Unsupervised learning: is very much the opposite of supervised learning. It features no labels. Instead, our algorithm would be fed a lot of data and given the tools to understand the properties of the data. From there, it can learn to group, cluster, and/or organize the data in a way such that a human (or other intelligent algorithm) can come in and make sense of the newly organized data.
  • 13. Unsupervised learning Unsupervised learning 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.
  • 14. Unsupervised learning: Dimensionality Reduction (DR) There are two components of dimensionality reduction: Feature extraction: This reduces the data in a high dimensional space to a lower dimension space, i.e. a space with lesser no. of dimensions. a+b+c+d = e ab+c+d = e Feature selection: In this, we try to find a subset of the original set of features, to get a smaller subset which can be used to model the problem c = 0 Sample of algorithms : FastText alg, BlazingText alg, Principal component analysis (PCA)
  • 15. 3- Reinforcement learning (RL) It is about taking suitable action to maximize reward in a particular situation.
  • 16. 3- Reinforcement learning (RL) Types of Reinforcement: There are two types of Reinforcement: 1- Positive: Positive Reinforcement is defined as when an event, occurs due to a particular behavior, increases the strength and the frequency of the behavior. In other words it has a positive effect. 2-Negative: Negative Reinforcement is defined as strengthening of a behavior because a negative condition is stopped or avoided. Use Cases of RL : Real-time decisions , Game AI, Robo navigation, auto drive cars
  • 17. Data types from ML perspectives 1- Numerical Data 2- Categorical Data 3- Time Series Data 4- Text
  • 18. 1- Numerical Data: Numerical data is any data where data points are exact numbers. Statisticians also might call numerical data, quantitative data. This data has meaning as a measurement such as house prices.
  • 19. 2- Categorical Data Categorical data represents characteristics, such as a hockey player’s positions. Categorical data can take numerical values. For example, maybe we would use 1 for colour red and 2 for blue. But these numbers don’t have a mathematical meaning.
  • 20. 3- Time Series Data Time series data is a sequence of numbers collected at regular intervals over some period of time. It is very important, especially in particular fields like finance. Time series data has a temporal value attached to it, so this would be something like a date or a timestamp that you can look for trends in time.
  • 21. 4- Text Text data is basically just words. A lot of the time the first thing that you do with text is you turn it into numbers using some interesting functions like the bag of words formulation. We can use stemming, lowercase functions .. etc
  • 22. 4- Text This is working not disappointed This is not working. disappointed Tokenization : [ ‘disappointed’, ’is’, ’not’, ’working’, ’this’ ]
  • 24. 4- Text Orthogonal sparse bigram (OSB) :
  • 25. 5- Working with missing data For row have a missing values you can : 1- Delete the row (if data is not related). 2- Impute missing data: A- if data is related to each other you can calculate the mean for that column. B- if data is independent you can pick data from another row. C-if data is related to timestamp: 1- interpolation 2- fill backward 3- fill forward
  • 26. 5- Working with missing data
  • 27. 5- Working with missing data
  • 28. 5- Working with missing data
  • 29. 5- Working with missing data
  • 30. 5- Working with missing data
  • 31. 5- Working with missing data
  • 32. 5- Working with missing data Some useful lib for python: 1-Numpy : Mathematical function for optimize large data 2- Pandas : Data analyzing and modeling & reading 3- Matplotlib : Plotting library for visualize the data
  • 33. 6- Model performance (fitting) Relationship between input and output could be: 1- Liner 2- non-liner Knowing this relation will help in using algorithm and choose the attributes needed in predict function
  • 34. 6- Model performance (fitting) 1- Underfitting: When: Poor performance in testing set , poor in training set Why: Feature is not enough to capture the relationship between input and output How : Add more rows , or add more features, optimize the hyperparameters 2- Overfitting: When: Poor performance in testing set , Good in training set Why: Model memories the data it has seen and unable to generalize it on unseen data. How: Removing complex feature and optimize the hyperparameters 3- Balanced: Good performance in testing set , Poor in training set
  • 35. Regression model performance Common Techniques for evaluating performance: Visually observe using Plots Residual Histograms (negative less than positive) Evaluate with Metrics like Root Mean Square Error (RMSE)
  • 36. Binary & multi-class model performance Common Techniques for evaluating performance: Visually observe using Plots Confusion Matrix