SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
Learning	Machine	Learning
A	little	intro	to	a	(not	that	complex)	world
@joel__lord
#phptek
About	Me
@joel__lord
#phptek
Our	Agenda	for	today…
• AI	vs	ML
• Deep	Learning	&	
Neural	Networks
• Supervised	vs	
unsupervised
• Naïve	Bayes	Classifier
• Genetic	Algorithms
• Q&A
@joel__lord
#phptek
@joel__lord
#phptek
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
#phptek
Artificial	Intelligence
“takes	actions	that	maximize	
its	chance	of	success	at	some	
goal”
@joel__lord
#phptek
Examples	in	real	life
@joel__lord
#phptek
Machine	Learning
Machine	learning	(ML) is	the	subfield	
of computer	science that	gives	"computers	the	
ability	to	learn	without	being	explicitly	
programmed."
@joel__lord
#phptek
@joel__lord
#phptek
@joel__lord
#phptek
@joel__lord
#phptek
@joel__lord
#phptek
@joel__lord
#phptek
“Don’t	be	afraid	of	artificial	intelligence,	be	
afraid	of	humanity.”
@joel__lord
#phptek
Deep	Learning	&	
Big	Data
• Explosion	of	digital	data
• Can’t	be	processed	with	
traditional	methods	
anymore
@joel__lord
#phptek
Neural	
Networks
• Breaking	big	problems	
in	small	layers
@joel__lord
#phptek
Supervised
Learning
• Requires feedback
• Starts with nothing
and increases its
understanding
• Useless if the data
is of bad quality
• Use cases:
• Classification
@joel__lord
#phptek
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
#phptek
The	Naïve	Bayes	Classifier
@joel__lord
#phptek
Bayes	Theorem
• 𝑃 𝐴 𝐵 =
% &
% & '% (
@joel__lord
#phptek
Bayes	Theorem
• 𝑃 𝐴 𝐵 =
% 𝐵 𝐴 % &
% 𝐵 𝐴 % & ' )*% 𝐵 𝐴 )*% &
@joel__lord
#phptek
Bayes	Theorem
• 𝑃 𝐴 𝐵 =
∏ % 𝐴 𝑊-
.
/01
∏ % 𝐴 𝑊-
.
/01 ' ∏ )*% 𝐴 𝑊-
.
/01
@joel__lord
#phptek
Bayes	Theorem
• 𝑃 𝐴 𝐵 = 𝑊2∱
@joel__lord
#phptek
Naive	Bayes	
Classifier
• Let’s	look	at	a	concrete	
example.
• You	never	know	what	
you’re	gonna get
@joel__lord
#phptek
Probability	that	a	chocolate	has	nuts
Nuts No	Nuts
Round 25% 75%
Square 75% 25%
Dark 10% 90%
Light 90% 10%
@joel__lord
#phptek
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
#phptek
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
4 𝑷𝒊
𝒏
𝒊8𝟏
0.225 0.075
@joel__lord
#phptek
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
4 𝑷𝒊
𝒏
𝒊8𝟏
0.225 0.075
𝑃 🌰 =	
0.225
0.225 + 0.075
= 0.75 = 75%
@joel__lord
#phptek
Naïve	Bayes	Classifier	in	code
var Classifier = function() {
this.dictionaries = {};
};
Classifier.prototype.classify = function(text, group) {
};
Classifier.prototype.categorize = function(text) {
};
@joel__lord
#phptek
@joel__lord
#phptek
Sentiment	
Analysis
• Not	Machine	Learning
• Uses	classifiers	and	
AFINN-165	(and	
emojis)
@joel__lord
#phptek
Sentiment	
Analysis
• Javascript:
• npm install	sentiment
• PHP:	
• composer	require	
risan/sentiment-
analysis
@joel__lord
#phptek
Genetic	
Algorithm
• Awesome	shit!
@joel__lord
#phptek
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
#phptek
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
#phptek
Genetic	Algorithm
Credit:	AutoDesk
https://autodeskresearch.com/projects/Dreamcatcher
@joel__lord
#phptek
https://www.youtube.com/watch?v=yci5FuI1ovk
@joel__lord
#phptek
Genetic	Algorithm	in	code
//Declare Consts
function randomInt(min, max) {…}
function random(min, max) {…}
function randomIndividual() {…}
function randomPopulation(size) {…}
function fitness(individual) {…}
function sortByFitness(population) {…}
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();
Impact	of	parameters on	Genetic Algorithms
@joel__lord
#phptek
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	[tek],	May	26th 2017
@joel__lord
joellord
Thank	you
https://joind.in/talk/47902
Presented	By
JOEL	LORD
PHP	[tek],	May	26th 2017
@joel__lord
joellord
Questions?
https://joind.in/talk/47902

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

(Ch#1) artificial intelligence
(Ch#1) artificial intelligence(Ch#1) artificial intelligence
(Ch#1) artificial intelligence
 
Artificial Intelligence by Jayant
Artificial Intelligence by JayantArtificial Intelligence by Jayant
Artificial Intelligence by Jayant
 
Artificial Intelligence power point presentation document
Artificial Intelligence power point presentation documentArtificial Intelligence power point presentation document
Artificial Intelligence power point presentation document
 
Artificial Intelligence Techniques In Power Systems Paper Presentation
Artificial Intelligence Techniques In Power Systems Paper PresentationArtificial Intelligence Techniques In Power Systems Paper Presentation
Artificial Intelligence Techniques In Power Systems Paper Presentation
 
Artificial Intelligence for Business
Artificial Intelligence for BusinessArtificial Intelligence for Business
Artificial Intelligence for Business
 
Artificial Intelligence- An Introduction
Artificial Intelligence- An IntroductionArtificial Intelligence- An Introduction
Artificial Intelligence- An Introduction
 
Artificial intelligence original
Artificial intelligence originalArtificial intelligence original
Artificial intelligence original
 
Artificial intelligence in cyber defense
Artificial intelligence in cyber defenseArtificial intelligence in cyber defense
Artificial intelligence in cyber defense
 
Intelligent systems
Intelligent systems Intelligent systems
Intelligent systems
 
Introduction of Artificial Intelligence
Introduction of Artificial IntelligenceIntroduction of Artificial Intelligence
Introduction of Artificial Intelligence
 
Machine learning seminar presentation
Machine learning seminar presentationMachine learning seminar presentation
Machine learning seminar presentation
 
artificial Intelligence
artificial Intelligence artificial Intelligence
artificial Intelligence
 
Lebanon SoftShore Artificial Intelligence Seminar - March 38, 2014
Lebanon SoftShore Artificial Intelligence Seminar - March 38, 2014Lebanon SoftShore Artificial Intelligence Seminar - March 38, 2014
Lebanon SoftShore Artificial Intelligence Seminar - March 38, 2014
 
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKSARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
 
Machine Learning -- The Artificial Intelligence Revolution
Machine Learning -- The Artificial Intelligence RevolutionMachine Learning -- The Artificial Intelligence Revolution
Machine Learning -- The Artificial Intelligence Revolution
 
Artificial Intelligence (AI) -> understanding what it is & how you can use it...
Artificial Intelligence (AI) -> understanding what it is & how you can use it...Artificial Intelligence (AI) -> understanding what it is & how you can use it...
Artificial Intelligence (AI) -> understanding what it is & how you can use it...
 
Introduction to Computational Intelligent
Introduction to Computational IntelligentIntroduction to Computational Intelligent
Introduction to Computational Intelligent
 
Computational Intelligence and Applications
Computational Intelligence and ApplicationsComputational Intelligence and Applications
Computational Intelligence and Applications
 
BE-EEE-8th sem-Presentation Artificial intelligence in security managenent
BE-EEE-8th sem-Presentation Artificial intelligence in security managenentBE-EEE-8th sem-Presentation Artificial intelligence in security managenent
BE-EEE-8th sem-Presentation Artificial intelligence in security managenent
 
Paper sharing_deep learning for smart manufacturing methods and applications
Paper sharing_deep learning for smart manufacturing methods and applicationsPaper sharing_deep learning for smart manufacturing methods and applications
Paper sharing_deep learning for smart manufacturing methods and applications
 

Similar a Learning About Machine Learning

Introduction to artificial intelligence
Introduction to artificial intelligenceIntroduction to artificial intelligence
Introduction to artificial intelligence
SindhuVelmukull
 
Artificial intelligence introduction
Artificial intelligence introductionArtificial intelligence introduction
Artificial intelligence introduction
Prafulla Tekriwal
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
ravijain90
 

Similar a Learning About Machine Learning (20)

Learning Machine Learning
Learning Machine LearningLearning Machine Learning
Learning Machine Learning
 
Learning Machine Learning
Learning Machine LearningLearning Machine Learning
Learning Machine Learning
 
Learning Machine Learning
Learning Machine LearningLearning Machine Learning
Learning Machine Learning
 
AN INTRODUCTION TO EMERGING TECHNOLOGY
AN INTRODUCTION TO EMERGING TECHNOLOGYAN INTRODUCTION TO EMERGING TECHNOLOGY
AN INTRODUCTION TO EMERGING TECHNOLOGY
 
Ai in software automation testing - testim.io
Ai in software automation testing - testim.ioAi in software automation testing - testim.io
Ai in software automation testing - testim.io
 
Artificial Intelligence: An Introduction
 Artificial Intelligence: An Introduction Artificial Intelligence: An Introduction
Artificial Intelligence: An Introduction
 
Simplified Introduction to AI
Simplified Introduction to AISimplified Introduction to AI
Simplified Introduction to AI
 
Advancement in artificial intelligence: Should Humans be Worried?
Advancement in artificial intelligence: Should Humans be Worried?Advancement in artificial intelligence: Should Humans be Worried?
Advancement in artificial intelligence: Should Humans be Worried?
 
Introduction to AI.pptx
Introduction to AI.pptxIntroduction to AI.pptx
Introduction to AI.pptx
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Introduction to artificial intelligence
Introduction to artificial intelligenceIntroduction to artificial intelligence
Introduction to artificial intelligence
 
Ai
AiAi
Ai
 
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptxunleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
 
Introduction to Artificial Intelligence and Machine Learning with Python
Introduction to Artificial Intelligence and Machine Learning with Python Introduction to Artificial Intelligence and Machine Learning with Python
Introduction to Artificial Intelligence and Machine Learning with Python
 
Artificial Intelligence and Machine Learning
Artificial Intelligence and Machine LearningArtificial Intelligence and Machine Learning
Artificial Intelligence and Machine Learning
 
Aritficial intelligence
Aritficial intelligenceAritficial intelligence
Aritficial intelligence
 
Artificial intelligence introduction
Artificial intelligence introductionArtificial intelligence introduction
Artificial intelligence introduction
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Skills in Artificial Intelligence
Skills in Artificial IntelligenceSkills in Artificial Intelligence
Skills in Artificial Intelligence
 

Más de Joel Lord

Más de Joel Lord (20)

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

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

Learning About Machine Learning