What if Adham Nour tried to make
a Machine Learning Model, at Home!
By. Mohamed Essam
Whoa!
“Computers are able to see, hear and
learn. Welcome to the future.”
—~Dave Waters
What Artificial Intelligence is!
What Artificial Intelligence is!
Different between traditional programming and
Machine Learning Programming
Traditional programming
I know the equation
Example BMI function is
BMI=
𝒘𝒆𝒊𝒈𝒉𝒕
𝒉𝒆𝒊𝒈𝒉𝒕𝟐
Machine Learning Programming
I use Function called (train) to get the equation.
Example if there is the house cost 600$ and it’s a
200m then the equation will be
price= 𝟑𝒙
100 200 300 400
1200
900
600
300
size
How To Create a Machine Learning
model
ML Model
How To Create a Machine Learning
model
ML Model
Machine Learning and
Starbucks coffee Workflow
Machine Learning Workflow
Getting the
Data
“I can’t make bricks without clay”.
-Arthur Conan Doyle
“I can’t make bricks without clay”.
-Arthur Conan Doyle
Data Gathering
1
Might depend on humanwork
• Manual labeling for supervisedlearning.
• Domain knowledge. Maybe evenexperts.
May come for free, or “sortof”
• E.g.,Machine Translation.
The more the better:Some algorithms need large amounts of data to be useful
(e.g.,neural networks).
The quantity and quality of data dictate the modelaccuracy
Machine Learning Workflow
Getting the
Data
Preparing
data
Data Preprocessing
Is there anything wrong withthedata?
• Missing values
• Outliers
• Bad encoding (fortext)
• Wrongly-labeled examples
• Biased data
• Do I have manymore samples of one class
than therest?
Need to fix/removedata?
1
Machine Learning Workflow
Getting the
Data
Preparing
data
Selecting
The
Algorithm
Machine Learning Workflow
Getting the
Data
Preparing
data
Selecting
The
Algorithm
Training the
model
Machine Learning Workflow
Getting the
Data Preparing
data
Selecting
The
Algorithm
Training the
model
Testing the
model
Machine Learning work Flow
Guidelines
• Data is never as you need it
• More data is better.
• Expect to go backward
3
Machine Learning work Flow
Guidelines
• Data is never as you need it
• More data is better.
• Expect to go backward
3
Machine Learning isn’t Magic?
No, more like Adham Nour
Coffee Seeds = Data
Coffee Machines= Algorithms
Adham Nour= You
Cup of Coffee= Model
Types of Machine LearningProblems
Supervised
Unsupervised
Reinforcement
Output is a discrete
variable (e.g.,cat/dog)
Classification
Regression
Output is continuous
(e.g.,price, temperature)
Types of Machine LearningProblems
Unsupervised
There is no desired output. Learn somethingabout
the data. Latent relationships.
I want to find anomalies in the credit cardusage
patterns of my customers.
3
I have photos and want to put them in 20
groups.
Supervised
Reinforcement
Types of Machine LearningProblems
Supervised
Reinforcement
 Environment gives feedback via a positiveor
negative reward signal.
 An agent interacts with an environment and
watches the result of the interaction.
Un Supervised
Supervised Learning
Supervised Learning
Supervised Learning Algorithms
Supervised
• Linear classifier
• Naive Bayes
• Support VectorMachines (SVM(
• Decision Tree
• Random Forests
• k-Nearest Neighbors
• Neural Networks (Deeplearning)
Unsupervised
• PCA
• t-SNE
• k-means
• DBSCAN
Reinforcement
• SARSA–λ
• Q-Learning
SVM Algorithm
SVM Algorithm Regularization
Also the ‘ C ‘ parameter in Python’s SkLearn Library
Optimises SVM classifier to avoid misclassifying the data.
C → large
C → small
Margin of hyperplane → small
Margin of hyperplane → large
misclassification(possible)
C ---> large , chance of overfit
C ---> small , chance of underfitting
Any Questions?
Mohamed Essam
!
CREDITS: This presentation template was created by Slidesgo,
including icons by Flaticon, and infographics & images by Freepik
THANKS!
Contacts
Mhmd96.essam@gmail.com
Please keep this slide for attribution

1.What_if_Adham_Nour_tried_to_make_a_Machine_Learning_Model_at_Home.pptx

  • 1.
    What if AdhamNour tried to make a Machine Learning Model, at Home! By. Mohamed Essam
  • 2.
    Whoa! “Computers are ableto see, hear and learn. Welcome to the future.” —~Dave Waters
  • 3.
  • 4.
  • 5.
    Different between traditionalprogramming and Machine Learning Programming Traditional programming I know the equation Example BMI function is BMI= 𝒘𝒆𝒊𝒈𝒉𝒕 𝒉𝒆𝒊𝒈𝒉𝒕𝟐 Machine Learning Programming I use Function called (train) to get the equation. Example if there is the house cost 600$ and it’s a 200m then the equation will be price= 𝟑𝒙 100 200 300 400 1200 900 600 300 size
  • 6.
    How To Createa Machine Learning model ML Model
  • 7.
    How To Createa Machine Learning model ML Model
  • 9.
  • 10.
  • 11.
    “I can’t makebricks without clay”. -Arthur Conan Doyle
  • 12.
    “I can’t makebricks without clay”. -Arthur Conan Doyle
  • 14.
    Data Gathering 1 Might dependon humanwork • Manual labeling for supervisedlearning. • Domain knowledge. Maybe evenexperts. May come for free, or “sortof” • E.g.,Machine Translation. The more the better:Some algorithms need large amounts of data to be useful (e.g.,neural networks). The quantity and quality of data dictate the modelaccuracy
  • 15.
    Machine Learning Workflow Gettingthe Data Preparing data
  • 18.
    Data Preprocessing Is thereanything wrong withthedata? • Missing values • Outliers • Bad encoding (fortext) • Wrongly-labeled examples • Biased data • Do I have manymore samples of one class than therest? Need to fix/removedata? 1
  • 19.
    Machine Learning Workflow Gettingthe Data Preparing data Selecting The Algorithm
  • 22.
    Machine Learning Workflow Gettingthe Data Preparing data Selecting The Algorithm Training the model
  • 28.
    Machine Learning Workflow Gettingthe Data Preparing data Selecting The Algorithm Training the model Testing the model
  • 35.
    Machine Learning workFlow Guidelines • Data is never as you need it • More data is better. • Expect to go backward 3
  • 36.
    Machine Learning workFlow Guidelines • Data is never as you need it • More data is better. • Expect to go backward 3
  • 37.
    Machine Learning isn’tMagic? No, more like Adham Nour Coffee Seeds = Data Coffee Machines= Algorithms Adham Nour= You Cup of Coffee= Model
  • 38.
    Types of MachineLearningProblems Supervised Unsupervised Reinforcement Output is a discrete variable (e.g.,cat/dog) Classification Regression Output is continuous (e.g.,price, temperature)
  • 39.
    Types of MachineLearningProblems Unsupervised There is no desired output. Learn somethingabout the data. Latent relationships. I want to find anomalies in the credit cardusage patterns of my customers. 3 I have photos and want to put them in 20 groups. Supervised Reinforcement
  • 40.
    Types of MachineLearningProblems Supervised Reinforcement  Environment gives feedback via a positiveor negative reward signal.  An agent interacts with an environment and watches the result of the interaction. Un Supervised
  • 41.
  • 42.
  • 43.
    Supervised Learning Algorithms Supervised •Linear classifier • Naive Bayes • Support VectorMachines (SVM( • Decision Tree • Random Forests • k-Nearest Neighbors • Neural Networks (Deeplearning) Unsupervised • PCA • t-SNE • k-means • DBSCAN Reinforcement • SARSA–λ • Q-Learning
  • 44.
  • 45.
    SVM Algorithm Regularization Alsothe ‘ C ‘ parameter in Python’s SkLearn Library Optimises SVM classifier to avoid misclassifying the data. C → large C → small Margin of hyperplane → small Margin of hyperplane → large misclassification(possible) C ---> large , chance of overfit C ---> small , chance of underfitting
  • 46.
  • 47.
    CREDITS: This presentationtemplate was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik THANKS! Contacts Mhmd96.essam@gmail.com Please keep this slide for attribution