Learning Machine Learning

J
Learning Machine
Learning
A little intro to a (not that complex) world
@joel__lord
#phpworld
About Me
@joel__lord
joellord
@joel__lord
#phpworld
Our Agenda for today…
• AI vs ML
• Deep Learning &
Neural Networks
• Supervised vs
unsupervised
• Naïve Bayes Classifier
• Genetic Algorithms
@joel__lord
#phpworld
@joel__lord
#phpworld
Artificial Intelligence
Artificial intelligence (AI)
is intelligence exhibited by machines.
In computer science, the field of AI
research defines itself as the study of
"intelligent agents": any device that
perceives its environment and takes actions
that maximize its chance of success at
some goal.
@joel__lord
#phpworld
Artificial Intelligence
“takes actions that
maximize its chance of
success at some goal”
@joel__lord
#phpworld
Examples in real life
@joel__lord
#phpworld
Machine Learning
Machine learning (ML) is the subfield
of computer science that gives "computers
the ability to learn without being explicitly
programmed."
@joel__lord
#phpworld
@joel__lord
#phpworld
@joel__lord
#phpworld
@joel__lord
#phpworld
@joel__lord
#phpworld
@joel__lord
#phpworld
“Don’t be afraid of artificial
intelligence, be afraid of humanity.”
@joel__lord
#phpworld
Deep Learning
& Big Data
• Explosion of digital data
• Can’t be processed with
traditional methods
anymore
@joel__lord
#phpworld
Neural
Networks
• Breaking big
problems in small
layers
• Making connections
@joel__lord
#phpworld
Supervised
Learning
• Requires feedback
• Starts with nothing
and increases its
understanding
• Useless if the data
is of bad quality
• Use cases:
• Classification
@joel__lord
#phpworld
Unsupervised
Learning
• There is no feedback
• Good in the case of no right or
wrong answer
• Helps to identify patterns or data
structures
• Use case:
• You might also be interested
in…
• Grouping customers by
purchasing behaviors
@joel__lord
#phpworld
The Naïve Bayes Classifier
@joel__lord
#phpworld
Bayes Theorem
@joel__lord
#phpworld
Bayes Theorem
where
@joel__lord
#phpworld
Bayes Theorem
•  
@joel__lord
#phpworld
Bayes Theorem
•  
@joel__lord
#phpworld
Naive Bayes
Classifier
• Let’s look at a concrete
example.
• You never know what
you’re gonna get
@joel__lord
#phpworld
Probability that a chocolate has nuts
Nuts No Nuts
Round 25% 75%
Square 75% 25%
Dark 10% 90%
Light 90% 10%
@joel__lord
#phpworld
Do round, light chocolates have nuts?
Nuts No Nuts
Round 25% 75% 0.25 0.75
Square 75% 25% - -
Dark 10% 90% - -
Light 90% 10% 0.9 0.1
@joel__lord
#phpworld
Do round, light chocolates have nuts?
Nuts No Nuts
Round 25% 75% 0.25 0.75
Square 75% 25% - -
Dark 10% 90% - -
Light 90% 10% 0.9 0.1
0.225 0.075
@joel__lord
#phpworld
Do round, light chocolates have nuts?
Nuts No Nuts
Round 25% 75% 0.25 0.75
Square 75% 25% - -
Dark 10% 90% - -
Light 90% 10% 0.9 0.1
0.225 0.075
 
@joel__lord
#phpworld
Naïve Bayes Classifier in code
var Classifier = function() {
this.dictionaries = {};
};
Classifier.prototype.classify = function(text, group) {
};
Classifier.prototype.categorize = function(text) {
};
@joel__lord
#phpworld
@joel__lord
#phpworld
Sentiment
Analysis
• Not Machine
Learning
• Uses classifiers and
AFINN-165 (and
emojis)
@joel__lord
#phpworld
Sentiment
Analysis
• Javascript:
• npm install
sentiment
• PHP:
• composer require
risan/sentiment-
analysis
@joel__lord
#phpworld
Genetic
Algorithm
• Awesome shit!
@joel__lord
#phpworld
Genetic
Algorithm
• Create a population of
random individuals
• Keep the closest individuals
• Keep a few random
individuals
• Introduce random
mutations
• Randomly create ”children”
• Magically end up with a
valid solution
@joel__lord
#phpworld
Genetic
Algorithm
• Create a population of
random individuals
• Keep the closest individuals
• Keep a few random
individuals
• Introduce random
mutations
• Randomly create ”children”
• Magically end up with a
valid solution
@joel__lord
#phpworld
Genetic Algorithm
Credit: AutoDesk https://autodeskresearch.com/projects/
Dreamcatcher
@joel__lord
#phpworld
https://www.youtube.com/watch?v=pgaEE27nsQw
@joel__lord
#phpworld
Boring!
@joel__lord
#phpworld
@joel__lord
#phpworld
Genetic Algorithm in code
//Declare Consts
function randomInt(min, max) {…}
function random(min, max) {…}
function fitness(individual) {…}
function sortByFitness(population) {…}
function randomIndividual() {…}
function randomPopulation(size) {…}
function mutate(population) {…}
function reproduce(father, mother) {…}
function evolve(population) {…}
function findSolution() {
var population = randomPopulation(POP_SIZE);
var generation = 0;
while (fitness(population[0]) > CLOSE_ENOUGH) {
generation++;
population = evolve(population);
}
return {solution: population[0], generations: generation};
}
var sol = findSolution();
@joel__lord
#phpworld
What did we learn?
• Machine Learning and Artificial Intelligence
• Big Data and Deep Learning
• Supervised vs unsupervised
• Basic Algorithms
• Naïve Bayes Classifier
• Sentiment Analysis
• Genetic Algorithm
@joel__lord
#phpworld
What did we learn?
• Machine Learning and Artificial Intelligence
• Big Data and Deep Learning
• Supervised vs unsupervised
• Basic Algorithms
• Naïve Bayes Classifier
• Sentiment Analysis
• Genetic Algorithm
• Hopefully, you don’t feel intimidated by ML anymore
Presented By
JOEL LORD
php[world], November 15th, 2018
@joel__lord
joellord
Thank you!
Presented By
@joel__lord
joellord
Questions?
JOEL LORD
php[world], November 15th, 2018
Impact of parameters on Genetic Algorithms
1 of 45

Recommended

Learning Machine Learning by
Learning Machine LearningLearning Machine Learning
Learning Machine LearningJoel Lord
343 views42 slides
Learning About Machine Learning by
Learning About Machine LearningLearning About Machine Learning
Learning About Machine LearningJoel Lord
245 views43 slides
Learning About Machine Learning by
Learning About Machine LearningLearning About Machine Learning
Learning About Machine LearningJoel Lord
582 views42 slides
Learning Machine Learning by
Learning Machine LearningLearning Machine Learning
Learning Machine LearningJoel Lord
568 views42 slides
How to use Artificial Intelligence with Python? Edureka by
How to use Artificial Intelligence with Python? EdurekaHow to use Artificial Intelligence with Python? Edureka
How to use Artificial Intelligence with Python? EdurekaEdureka!
591 views79 slides
Deep Dive ML.NET by
Deep Dive ML.NETDeep Dive ML.NET
Deep Dive ML.NETSabah Shariq
34 views18 slides

More Related Content

Similar to Learning Machine Learning

The Impact of Machine Learning on Digital Commerce by
The Impact of Machine Learning on Digital CommerceThe Impact of Machine Learning on Digital Commerce
The Impact of Machine Learning on Digital CommerceAllan MacGregor
200 views49 slides
Artificial Intelligence (AI) Interview Questions and Answers | Edureka by
Artificial Intelligence (AI) Interview Questions and Answers | EdurekaArtificial Intelligence (AI) Interview Questions and Answers | Edureka
Artificial Intelligence (AI) Interview Questions and Answers | EdurekaEdureka!
1K views108 slides
Deep Learning in the Real World by
Deep Learning in the Real WorldDeep Learning in the Real World
Deep Learning in the Real WorldLukas Biewald
2.1K views107 slides
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete... by
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...SlideTeam
475 views98 slides
AI and ML for Product Management by Smartsheet Sr Dir of PM by
AI and ML for Product Management by Smartsheet Sr Dir of PMAI and ML for Product Management by Smartsheet Sr Dir of PM
AI and ML for Product Management by Smartsheet Sr Dir of PMProduct School
3.3K views34 slides
AI on a Pi by
AI on a PiAI on a Pi
AI on a PiJulien SIMON
739 views26 slides

Similar to Learning Machine Learning(20)

The Impact of Machine Learning on Digital Commerce by Allan MacGregor
The Impact of Machine Learning on Digital CommerceThe Impact of Machine Learning on Digital Commerce
The Impact of Machine Learning on Digital Commerce
Allan MacGregor200 views
Artificial Intelligence (AI) Interview Questions and Answers | Edureka by Edureka!
Artificial Intelligence (AI) Interview Questions and Answers | EdurekaArtificial Intelligence (AI) Interview Questions and Answers | Edureka
Artificial Intelligence (AI) Interview Questions and Answers | Edureka
Edureka!1K views
Deep Learning in the Real World by Lukas Biewald
Deep Learning in the Real WorldDeep Learning in the Real World
Deep Learning in the Real World
Lukas Biewald2.1K views
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete... by SlideTeam
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...
SlideTeam475 views
AI and ML for Product Management by Smartsheet Sr Dir of PM by Product School
AI and ML for Product Management by Smartsheet Sr Dir of PMAI and ML for Product Management by Smartsheet Sr Dir of PM
AI and ML for Product Management by Smartsheet Sr Dir of PM
Product School3.3K views
SearchLove San Diego 2017 | Michael King | Machine Doing by Distilled
SearchLove San Diego 2017 | Michael King | Machine DoingSearchLove San Diego 2017 | Michael King | Machine Doing
SearchLove San Diego 2017 | Michael King | Machine Doing
Distilled3.7K views
Artificial Intelligence Services - AAPNA Infotech by Aapna Infotech
Artificial Intelligence Services - AAPNA InfotechArtificial Intelligence Services - AAPNA Infotech
Artificial Intelligence Services - AAPNA Infotech
Aapna Infotech110 views
Machine intelligence to free human intelligence: How automation helps you win by Roger Chen
Machine intelligence to free human intelligence: How automation helps you winMachine intelligence to free human intelligence: How automation helps you win
Machine intelligence to free human intelligence: How automation helps you win
Roger Chen1.1K views
Hacking Predictive Modeling - RoadSec 2018 by HJ van Veen
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
HJ van Veen1.2K views
Artificial Intelligence in Microsoft 365 by Rhia Wieclawek
Artificial Intelligence in Microsoft 365Artificial Intelligence in Microsoft 365
Artificial Intelligence in Microsoft 365
Rhia Wieclawek59 views
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar by Rajkumar R
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by RajkumarWebinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
Rajkumar R197 views
Weaponizing Neural Networks. In your browser! by DefCamp
Weaponizing Neural Networks. In your browser!Weaponizing Neural Networks. In your browser!
Weaponizing Neural Networks. In your browser!
DefCamp233 views
North americai iotskynet-v2 by Steve Poole
North americai iotskynet-v2North americai iotskynet-v2
North americai iotskynet-v2
Steve Poole193 views
Introduction To TensorFlow by Spotle.ai
Introduction To TensorFlowIntroduction To TensorFlow
Introduction To TensorFlow
Spotle.ai1.1K views
Artificial Intelligence with Python | Edureka by Edureka!
Artificial Intelligence with Python | EdurekaArtificial Intelligence with Python | Edureka
Artificial Intelligence with Python | Edureka
Edureka!8.1K views
AI - To get an overview by Kranti Asapu
AI   - To get an overviewAI   - To get an overview
AI - To get an overview
Kranti Asapu148 views

More from Joel Lord

From Ceasar Cipher To Quantum Cryptography by
From Ceasar Cipher To Quantum CryptographyFrom Ceasar Cipher To Quantum Cryptography
From Ceasar Cipher To Quantum CryptographyJoel Lord
405 views185 slides
I Don't Care About Security (And Neither Should You) by
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)Joel Lord
670 views131 slides
I Don't Care About Security (And Neither Should You) by
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)Joel Lord
157 views128 slides
I Don't Care About Security (And Neither Should You) by
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)Joel Lord
323 views121 slides
Forgot Password? Yes I Did! by
Forgot Password? Yes I Did!Forgot Password? Yes I Did!
Forgot Password? Yes I Did!Joel Lord
432 views61 slides
I Don't Care About Security (And Neither Should You) by
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)Joel Lord
153 views126 slides

More from Joel Lord(20)

From Ceasar Cipher To Quantum Cryptography by Joel Lord
From Ceasar Cipher To Quantum CryptographyFrom Ceasar Cipher To Quantum Cryptography
From Ceasar Cipher To Quantum Cryptography
Joel Lord405 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord670 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord157 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord323 views
Forgot Password? Yes I Did! by Joel Lord
Forgot Password? Yes I Did!Forgot Password? Yes I Did!
Forgot Password? Yes I Did!
Joel Lord432 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord153 views
Mot de passe oublié? Absolument! by Joel Lord
Mot de passe oublié? Absolument!Mot de passe oublié? Absolument!
Mot de passe oublié? Absolument!
Joel Lord193 views
Asynchronicity: concurrency. A tale of by Joel Lord
Asynchronicity: concurrency. A tale ofAsynchronicity: concurrency. A tale of
Asynchronicity: concurrency. A tale of
Joel Lord283 views
Forgot Password? Yes I Did! by Joel Lord
Forgot Password? Yes I Did!Forgot Password? Yes I Did!
Forgot Password? Yes I Did!
Joel Lord295 views
WTH is a JWT by Joel Lord
WTH is a JWTWTH is a JWT
WTH is a JWT
Joel Lord909 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord125 views
Forgot Password? Yes I Did! by Joel Lord
Forgot Password? Yes I Did!Forgot Password? Yes I Did!
Forgot Password? Yes I Did!
Joel Lord115 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord196 views
WTH is a JWT by Joel Lord
WTH is a JWTWTH is a JWT
WTH is a JWT
Joel Lord311 views
Asynchonicity: concurrency. A tale of by Joel Lord
Asynchonicity: concurrency. A tale ofAsynchonicity: concurrency. A tale of
Asynchonicity: concurrency. A tale of
Joel Lord360 views
I Don't Care About Security by Joel Lord
I Don't Care About Security I Don't Care About Security
I Don't Care About Security
Joel Lord247 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord209 views
I Don't Care About Security (And Neither Should You) by Joel Lord
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Joel Lord233 views
Secure your SPA with Auth0 by Joel Lord
Secure your SPA with Auth0Secure your SPA with Auth0
Secure your SPA with Auth0
Joel Lord341 views
Learning Machine Learning by Joel Lord
Learning Machine LearningLearning Machine Learning
Learning Machine Learning
Joel Lord241 views

Recently uploaded

the internet.pptx by
the internet.pptxthe internet.pptx
the internet.pptxSrihariJena
6 views9 slides
Affiliate Marketing by
Affiliate MarketingAffiliate Marketing
Affiliate MarketingNavin Dhanuka
21 views30 slides
The Dark Web : Hidden Services by
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden ServicesAnshu Singh
22 views24 slides
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download by
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink DownloadAPNIC
112 views30 slides
WITS Deck by
WITS DeckWITS Deck
WITS DeckW.I.T.S.
36 views22 slides
Penetration Testing for Cybersecurity Professionals by
Penetration Testing for Cybersecurity ProfessionalsPenetration Testing for Cybersecurity Professionals
Penetration Testing for Cybersecurity Professionals211 Check
49 views17 slides

Recently uploaded(15)

The Dark Web : Hidden Services by Anshu Singh
The Dark Web : Hidden ServicesThe Dark Web : Hidden Services
The Dark Web : Hidden Services
Anshu Singh22 views
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download by APNIC
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
40th TWNIC OPM: On LEOs (Low Earth Orbits) and Starlink Download
APNIC112 views
WITS Deck by W.I.T.S.
WITS DeckWITS Deck
WITS Deck
W.I.T.S.36 views
Penetration Testing for Cybersecurity Professionals by 211 Check
Penetration Testing for Cybersecurity ProfessionalsPenetration Testing for Cybersecurity Professionals
Penetration Testing for Cybersecurity Professionals
211 Check49 views
40th TWNIC Open Policy Meeting: A quick look at QUIC by APNIC
40th TWNIC Open Policy Meeting: A quick look at QUIC40th TWNIC Open Policy Meeting: A quick look at QUIC
40th TWNIC Open Policy Meeting: A quick look at QUIC
APNIC109 views
40th TWNIC Open Policy Meeting: APNIC PDP update by APNIC
40th TWNIC Open Policy Meeting: APNIC PDP update40th TWNIC Open Policy Meeting: APNIC PDP update
40th TWNIC Open Policy Meeting: APNIC PDP update
APNIC106 views
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx by LeasedLinesQuote
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptxCracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Cracking the Code Decoding Leased Line Quotes for Connectivity Excellence.pptx
Liberando a produccion con confidencia.pdf by Andres Almiray
Liberando a produccion con confidencia.pdfLiberando a produccion con confidencia.pdf
Liberando a produccion con confidencia.pdf
Andres Almiray6 views
cis5-Project-11a-Harry Lai by harrylai126
cis5-Project-11a-Harry Laicis5-Project-11a-Harry Lai
cis5-Project-11a-Harry Lai
harrylai1269 views
ATPMOUSE_융합2조.pptx by kts120898
ATPMOUSE_융합2조.pptxATPMOUSE_융합2조.pptx
ATPMOUSE_융합2조.pptx
kts12089835 views

Learning Machine Learning