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

More Related Content

PDF
Learning Machine Learning
PDF
Learning About Machine Learning
PDF
Learning About Machine Learning
PDF
Learning Machine Learning
PPTX
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
PDF
How to use Artificial Intelligence with Python? Edureka
PDF
Deep Dive ML.NET
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Learning Machine Learning
Learning About Machine Learning
Learning About Machine Learning
Learning Machine Learning
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
How to use Artificial Intelligence with Python? Edureka
Deep Dive ML.NET
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Similar to Learning Machine Learning (20)

PDF
Learning About Machine Learning
PPTX
AI | Now + Next
PDF
The Impact of Machine Learning on Digital Commerce
PDF
Artificial Intelligence (AI) Interview Questions and Answers | Edureka
PPTX
Deep Learning in the Real World
PDF
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...
PDF
AI on a Pi
PDF
SearchLove San Diego 2017 | Michael King | Machine Doing
PPTX
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
PPTX
Craft of coding
PDF
Artificial Intelligence Services - AAPNA Infotech
PDF
Machine intelligence to free human intelligence: How automation helps you win
PDF
Hacking Predictive Modeling - RoadSec 2018
PDF
Artificial Intelligence in Microsoft 365
PPTX
Careers in the field of Artificial Intelligence
PPTX
TECHTalks - Buffalo NY - Liz Tsai
PPTX
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
PDF
Weaponizing Neural Networks. In your browser!
PDF
North americai iotskynet-v2
PDF
Spring into AI presented by Dan Vega 5/14
Learning About Machine Learning
AI | Now + Next
The Impact of Machine Learning on Digital Commerce
Artificial Intelligence (AI) Interview Questions and Answers | Edureka
Deep Learning in the Real World
Reinforcement Learning In AI Powerpoint Presentation Slide Templates Complete...
AI on a Pi
SearchLove San Diego 2017 | Michael King | Machine Doing
Artificial Intelligence 101: What is It and Why is it Suddenly a Big Deal Again?
Craft of coding
Artificial Intelligence Services - AAPNA Infotech
Machine intelligence to free human intelligence: How automation helps you win
Hacking Predictive Modeling - RoadSec 2018
Artificial Intelligence in Microsoft 365
Careers in the field of Artificial Intelligence
TECHTalks - Buffalo NY - Liz Tsai
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
Weaponizing Neural Networks. In your browser!
North americai iotskynet-v2
Spring into AI presented by Dan Vega 5/14
Ad

More from Joel Lord (20)

PDF
From Ceasar Cipher To Quantum Cryptography
PDF
I Don't Care About Security (And Neither Should You)
PDF
I Don't Care About Security (And Neither Should You)
PDF
I Don't Care About Security (And Neither Should You)
PDF
Forgot Password? Yes I Did!
PDF
I Don't Care About Security (And Neither Should You)
PDF
Mot de passe oublié? Absolument!
PDF
Asynchronicity: concurrency. A tale of
PDF
Forgot Password? Yes I Did!
PDF
WTH is a JWT
PDF
I Don't Care About Security (And Neither Should You)
PDF
Forgot Password? Yes I Did!
PDF
I Don't Care About Security (And Neither Should You)
PDF
WTH is a JWT
PDF
Asynchonicity: concurrency. A tale of
PDF
I Don't Care About Security
PDF
I Don't Care About Security (And Neither Should You)
PDF
I Don't Care About Security (And Neither Should You)
PDF
Secure your SPA with Auth0
PDF
Learning Machine Learning
From Ceasar Cipher To Quantum Cryptography
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)
Forgot Password? Yes I Did!
I Don't Care About Security (And Neither Should You)
Mot de passe oublié? Absolument!
Asynchronicity: concurrency. A tale of
Forgot Password? Yes I Did!
WTH is a JWT
I Don't Care About Security (And Neither Should You)
Forgot Password? Yes I Did!
I Don't Care About Security (And Neither Should You)
WTH is a JWT
Asynchonicity: concurrency. A tale of
I Don't Care About Security
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
Secure your SPA with Auth0
Learning Machine Learning
Ad

Recently uploaded (20)

PPTX
Basic_of_Computer_System.pptx class-8 com
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PPTX
Viva Digitally Software-Defined Wide Area Network.pptx
PDF
Containerization lab dddddddddddddddmanual.pdf
PPTX
ECO SAFE AI - SUSTAINABLE SAFE AND HOME HUB
PPTX
Partner to Customer - Sales Presentation_V23.01.pptx
PPTX
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
PDF
How Technology Shapes Our Information Age
PPTX
Cyber Hygine IN organizations in MSME or
DOCX
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
PPTX
Artificial_Intelligence_Basics use in our daily life
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PDF
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
PPTX
Digital Project Mastery using Autodesk Docs Workshops
PDF
Course Overview and Agenda cloud security
PDF
Alethe Consulting Corporate Profile and Solution Aproach
PPTX
Basic understanding of cloud computing one need
PPTX
Introduction to networking local area networking
PPTX
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
PPTX
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes
Basic_of_Computer_System.pptx class-8 com
Alethe Consulting Corporate Profile and Solution Aproach
Viva Digitally Software-Defined Wide Area Network.pptx
Containerization lab dddddddddddddddmanual.pdf
ECO SAFE AI - SUSTAINABLE SAFE AND HOME HUB
Partner to Customer - Sales Presentation_V23.01.pptx
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
How Technology Shapes Our Information Age
Cyber Hygine IN organizations in MSME or
Powerful Ways AIRCONNECT INFOSYSTEMS Pvt Ltd Enhances IT Infrastructure in In...
Artificial_Intelligence_Basics use in our daily life
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
Digital Project Mastery using Autodesk Docs Workshops
Course Overview and Agenda cloud security
Alethe Consulting Corporate Profile and Solution Aproach
Basic understanding of cloud computing one need
Introduction to networking local area networking
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
Top Website Bugs That Hurt User Experience – And How Expert Web Design Fixes

Learning Machine Learning