SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
James L. Weaver
Developer Advocate
jweaver@pivotal.io
JavaFXpert.com
@JavaFXpert
Machine Learning
The Fundamentals
About Presenter James Weaver
Java Champion, JavaOne Rockstar, plays well with others, etc :-)
@JavaFXpert
Author of several Java/JavaFX/RaspPi books
Developer Advocate & International Speaker for Pivotal
@JavaFXpert
From in Machine
Learning course (Stanford University
& Coursera) taught by Andrew Ng.
introductory video
Self-driving cars
@JavaFXpert
Generating image descriptions
@JavaFXpert
Supervised Learning
@JavaFXpert
S​upervised learning regression problem
(from )Andrew Ng’s Machine Learning course
@JavaFXpert
Unsupervised Learning
@JavaFXpert
Unsupervised learning finds structure in unlabeled data
(e.g. market segment discovery,
and social network analysis)
@JavaFXpert
Reinforcement Learning
@JavaFXpert
AlphaGo is a recent reinforcement learning success story
Source: https://gogameguru.com/i/2016/03/AlphaGo-Lee-Sedol-game-3-game-over.jpg
@JavaFXpert
Supervised Learning
(Let's dive in now)
@JavaFXpert
Supervised learning classification problem
(using the )Iris flower data set
@JavaFXpert
@JavaFXpert
Visualizing Iris dataset with TensorFlow tool
@JavaFXpert
Modeling the brain works well with machine learning
(ya think?)
(inputs)
(output)
@JavaFXpert
Anatomy of an Artificial Neural Network
(aka Deep Belief Network when multiple hidden layers)
@JavaFXpert
Neural net visualization app (uses Spring and DL4J)
github.com/JavaFXpert/visual-neural-net-server
github.com/JavaFXpert/ng2-spring-websocket-client
@JavaFXpert
Entering feature values for prediction (classification)
@JavaFXpert
Simple neural network trained for XOR logic
forward propagation
@JavaFXpert
Feedforward calculations with XOR example
For each layer:
Multiply inputs by weights: (1 x 8.54) + (0 x 8.55) = 8.54
Add bias: 8.54 + (-3.99) = 4.55
Use sigmoid activation function: 1 / (1 + e
-4.55
) = 0.99
@JavaFXpert
Simple neural network trained for XOR logic
back propagation (minimize cost function)
@JavaFXpert
Back propagation
(Uses gradient descent to iteratively minimize the cost function)
@JavaFXpert
Visual Neural Network application architecture
Spring makes REST services and WebSockets easy as π
@JavaFXpert
The app leverages machine learning libraries
found at deeplearning4j.org
@JavaFXpert
To quickly create a Spring project, visit
start.spring.io
@JavaFXpert
Lab Exercise:
@KatharineCodes @JavaFXpert
playground.tensorflow.org
1. Select the Circle dataset icon and only the X1 & X2 features.
2. Using a total of six neurons allocated among any number of
hidden layers, modify the hyperparameters in such a way that
minimizes the number of Epochs required to make the Test loss
and Training loss each <= 0.009
3. Tweet screenshot with your lowest Epochs result using
#MachineLearningExposed and presenters' Twitter IDs
Practice tuning neural network hyperparameters
Is Optimizing your Neural Network a Dark Art ?
Excellent by on neural networks and choosing hyperparametersarticle Preetham V V
@JavaFXpert
Various Neural Networks
Convolutional Neural Network for recognizing images
@JavaFXpert
cs231n.stanford.edu/
Convolutional neural network architecture
@JavaFXpert
adeshpande3.github.io/A-Beginner's-Guide-To-Understanding-Convolutional-Neural-Networks/
[by ]Adit Deshpande
Peeking into a convolutional neural network
[by Adam Harley]http://scs.ryerson.ca/~aharley/vis/
@JavaFXpert
Time series prediction with neural networks
What is happening? What is most likely to happen next?
@JavaFXpert
This is a job for a Recurrent Neural Network
What is happening? What is most likely to happen next?
@JavaFXpert
Music composition with an RNN
From: Music and Art Generation using Machine Learning | Curtis Hawthorne
@JavaFXpert
Predicting the most likely next note
From: Music and Art Generation using Machine Learning | Curtis Hawthorne
@JavaFXpert
Playing a duet with neural networks
https://aiexperiments.withgoogle.com/ai-duet/view/
@JavaFXpert
Playing a duet with neural networks
https://aiexperiments.withgoogle.com/ai-duet/view/
@JavaFXpert
Unsupervised Learning
@KatharineCodes @JavaFXpert
(Let's dive in now)
Using unsupervised learning to map artworks
@JavaFXpert
artsexperiments.withgoogle.com/tsnemap
Using unsupervised learning to map words
@JavaFXpert
The amazing power of word vectors - Adrian Colyer
word2vec vector representations of words
Using unsupervised learning to map words
@JavaFXpert
The amazing power of word vectors - Adrian Colyer
word2vec vector offsets for gender relationships
Using unsupervised learning to map words
@JavaFXpert
The amazing power of word vectors - Adrian Colyer
word2vec vector offsets for plural relationships
Using unsupervised learning to map words
@JavaFXpert
The amazing power of word vectors - Adrian Colyer
word2vec vector arithmetic
word2vec vector arithmetic
@JavaFXpert
The amazing power of word vectors - Adrian Colyer
King – Man + Woman = Queen
Visualizing word2vec words & points
@JavaFXpert
using Tensorflow Embedding Projector
Reinforcement Learning
(Let's dive in now)
@JavaFXpert
Using BURLAP for Reinforcement Learning
burlap.cs.brown.edu
@JavaFXpert
Learning to Navigate a Grid World with Q-Learning
@JavaFXpert
Rules of this Grid World
Agent may move left, right, up, or down
(actions)
Reward is 0 for each move
Reward is 5 for reaching top right corner
(terminal state)
Agent can't move into a wall or off-grid
Agent doesn't have a model of the grid
world. It must discover as it interacts.
Challenge: Given that there is only one state
that gives a reward, how can the agent work
out what actions will get it to the reward?
(AKA the credit assignment problem)
Goal of an episode is to maximize total reward
@JavaFXpert
This Grid World's MDP ( )Markov Decision Process
In this example, all actions are deterministic
@JavaFXpert
Agent learns optimal policy from interactions
with the environment (s, a, r, s')
Source: http://www.mdpi.com/sensors/sensors-15-06668/article_deploy/html/images/sensors-15-06668-g002-1024.png
@JavaFXpert
Visualizing training episodes
From BasicBehavior example in
https://github.com/jmacglashan/burlap_examples
@JavaFXpert
Expected future discounted rewards, and polices
@JavaFXpert
This example used discount factor 0.9
Low discount factors cause agent to prefer immediate rewards
@JavaFXpert
Exploration vs. Exploitation
How often should the agent try new paths vs. greedily taking known paths?
@JavaFXpert
Q-Learning approach to reinforcement learning
Left Right Up Down
...
2, 7 2.65 4.05 0.00 3.20
2, 8 3.65 4.50 4.50 3.65
2, 9 4.05 5.00 5.00 4.05
2, 10 4.50 4.50 5.00 3.65
...
Q-Learning table of expected values (cumulative discounted rewards) as a
result of taking an action from a state and following an optimal policy. Here's
an .explanation of how calculations in a Q-Learning table are performed
Actions
States
@JavaFXpert
Tic-Tac-Toe with Reinforcement Learning
Learning to win from experience rather than by being trained
@JavaFXpert
Inspired by the Tic-Tac-Toe Example section...
...of Reinforcement Learning: An Introduction
@JavaFXpert
Tic-Tac-Toe Learning Agent and Environment
X
O
Our learning agent is the "X" player, receiving +5 for
winning, -5 for losing, and -1 for each turn
The "O" player is part of the Environment. State and reward
updates that it gives the Agent consider the "O" play.
@JavaFXpert
Tic-Tac-Toe state is the game board and status
States 0 1 2 3 4 5 6 7 8
O I X I O X X I O, O won N/A N/A N/A N/A N/A N/A N/A N/A N/A
I I I I I I O I X, in prog 1.24 1.54 2.13 3.14 2.23 3.32 N/A 1.45 N/A
I I O I I X O I X, in prog 2.34 1.23 N/A 0.12 2.45 N/A N/A 2.64 N/A
I I O O X X O I X, in
prog
+4.0 -6.0 N/A N/A N/A N/A N/A -6.0 N/A
X I O I I X O I X, X won N/A N/A N/A N/A N/A N/A N/A N/A N/A
... Q-Learning table of expected values (cumulative discounted rewards) as a
result of taking an action from a state and following an optimal policy
Actions (Possible cells to play)
Unoccupied cell represented with an I in the States column
@JavaFXpert
Tic-Tac-Toe with Reinforcement Learning
https://github.com/JavaFXpert/tic-tac-toe-rl
@JavaFXpert
Through the Eyes of a Self-Driving Tesla
@JavaFXpert
Summary of links
Andrew Ng video:
Iris flower dataset:
Visual neural net server:
Visual neural net client:
Deep Learning for Java:
Spring initializr:
A.I Duet application:
Self driving car video:
https://www.coursera.org/learn/machine-learning/lecture/zcAuT/welcome-
to-machine-learning
https://en.wikipedia.org/wiki/Iris_flower_data_set
http://github.com/JavaFXpert/visual-neural-net-server
http://github.com/JavaFXpert/ng2-spring-websocket-client
http://deeplearning4j.org
http://start.spring.io
http://aiexperiments.withgoogle.com/ai-duet/view/
https://vimeo.com/192179727
@JavaFXpert
James L. Weaver
Developer Advocate
jweaver@pivotal.io
JavaFXpert.com
@JavaFXpert
Machine Learning
The Fundamentals

Más contenido relacionado

Similar a Machine Learning Fundamentals with Java Expert James Weaver

Neural networks across space & time : Deep learning in java
Neural networks across space & time : Deep learning in javaNeural networks across space & time : Deep learning in java
Neural networks across space & time : Deep learning in javaDave Snowdon
 
Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceVenkat Projects
 
Selenium web driver | java
Selenium web driver | javaSelenium web driver | java
Selenium web driver | javaRajesh Kumar
 
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Edureka!
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 
Atari Game State Representation using Convolutional Neural Networks
Atari Game State Representation using Convolutional Neural NetworksAtari Game State Representation using Convolutional Neural Networks
Atari Game State Representation using Convolutional Neural Networksjohnstamford
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesHenrik Olsson
 
How DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoHow DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoTim Riser
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slowaragozin
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer FarooquiDatabricks
 
Fun with Functional Programming in Clojure
Fun with Functional Programming in ClojureFun with Functional Programming in Clojure
Fun with Functional Programming in ClojureCodemotion
 

Similar a Machine Learning Fundamentals with Java Expert James Weaver (20)

Neural networks across space & time : Deep learning in java
Neural networks across space & time : Deep learning in javaNeural networks across space & time : Deep learning in java
Neural networks across space & time : Deep learning in java
 
Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performance
 
Selenium web driver | java
Selenium web driver | javaSelenium web driver | java
Selenium web driver | java
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
Java Interview Questions and Answers | Spring and Hibernate Interview Questio...
 
Ase02.ppt
Ase02.pptAse02.ppt
Ase02.ppt
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 
Spring ME JavaOne
Spring ME JavaOneSpring ME JavaOne
Spring ME JavaOne
 
Flavio Percoco - Glance Wants to Go Public
Flavio Percoco - Glance Wants to Go PublicFlavio Percoco - Glance Wants to Go Public
Flavio Percoco - Glance Wants to Go Public
 
Glance wants to go public
Glance wants to go publicGlance wants to go public
Glance wants to go public
 
Atari Game State Representation using Convolutional Neural Networks
Atari Game State Representation using Convolutional Neural NetworksAtari Game State Representation using Convolutional Neural Networks
Atari Game State Representation using Convolutional Neural Networks
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project Experiences
 
Spring ME
Spring MESpring ME
Spring ME
 
How DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of GoHow DeepMind Mastered The Game Of Go
How DeepMind Mastered The Game Of Go
 
I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slow
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
alexVAE_New.pdf
alexVAE_New.pdfalexVAE_New.pdf
alexVAE_New.pdf
 
Fun with Functional Programming in Clojure
Fun with Functional Programming in ClojureFun with Functional Programming in Clojure
Fun with Functional Programming in Clojure
 

Más de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Más de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Machine Learning Fundamentals with Java Expert James Weaver

  • 1. James L. Weaver Developer Advocate jweaver@pivotal.io JavaFXpert.com @JavaFXpert Machine Learning The Fundamentals
  • 2. About Presenter James Weaver Java Champion, JavaOne Rockstar, plays well with others, etc :-) @JavaFXpert Author of several Java/JavaFX/RaspPi books Developer Advocate & International Speaker for Pivotal
  • 3.
  • 4. @JavaFXpert From in Machine Learning course (Stanford University & Coursera) taught by Andrew Ng. introductory video
  • 8. S​upervised learning regression problem (from )Andrew Ng’s Machine Learning course @JavaFXpert
  • 10. Unsupervised learning finds structure in unlabeled data (e.g. market segment discovery, and social network analysis) @JavaFXpert
  • 12. AlphaGo is a recent reinforcement learning success story Source: https://gogameguru.com/i/2016/03/AlphaGo-Lee-Sedol-game-3-game-over.jpg @JavaFXpert
  • 13. Supervised Learning (Let's dive in now) @JavaFXpert
  • 14. Supervised learning classification problem (using the )Iris flower data set @JavaFXpert
  • 16. Visualizing Iris dataset with TensorFlow tool @JavaFXpert
  • 17. Modeling the brain works well with machine learning (ya think?) (inputs) (output) @JavaFXpert
  • 18. Anatomy of an Artificial Neural Network (aka Deep Belief Network when multiple hidden layers) @JavaFXpert
  • 19. Neural net visualization app (uses Spring and DL4J) github.com/JavaFXpert/visual-neural-net-server github.com/JavaFXpert/ng2-spring-websocket-client @JavaFXpert
  • 20. Entering feature values for prediction (classification) @JavaFXpert
  • 21. Simple neural network trained for XOR logic forward propagation @JavaFXpert
  • 22. Feedforward calculations with XOR example For each layer: Multiply inputs by weights: (1 x 8.54) + (0 x 8.55) = 8.54 Add bias: 8.54 + (-3.99) = 4.55 Use sigmoid activation function: 1 / (1 + e -4.55 ) = 0.99 @JavaFXpert
  • 23. Simple neural network trained for XOR logic back propagation (minimize cost function) @JavaFXpert
  • 24.
  • 25.
  • 26. Back propagation (Uses gradient descent to iteratively minimize the cost function) @JavaFXpert
  • 27. Visual Neural Network application architecture Spring makes REST services and WebSockets easy as π @JavaFXpert
  • 28. The app leverages machine learning libraries found at deeplearning4j.org @JavaFXpert
  • 29. To quickly create a Spring project, visit start.spring.io @JavaFXpert
  • 30. Lab Exercise: @KatharineCodes @JavaFXpert playground.tensorflow.org 1. Select the Circle dataset icon and only the X1 & X2 features. 2. Using a total of six neurons allocated among any number of hidden layers, modify the hyperparameters in such a way that minimizes the number of Epochs required to make the Test loss and Training loss each <= 0.009 3. Tweet screenshot with your lowest Epochs result using #MachineLearningExposed and presenters' Twitter IDs Practice tuning neural network hyperparameters
  • 31. Is Optimizing your Neural Network a Dark Art ? Excellent by on neural networks and choosing hyperparametersarticle Preetham V V @JavaFXpert
  • 32. Various Neural Networks Convolutional Neural Network for recognizing images @JavaFXpert cs231n.stanford.edu/
  • 33. Convolutional neural network architecture @JavaFXpert adeshpande3.github.io/A-Beginner's-Guide-To-Understanding-Convolutional-Neural-Networks/ [by ]Adit Deshpande
  • 34. Peeking into a convolutional neural network [by Adam Harley]http://scs.ryerson.ca/~aharley/vis/ @JavaFXpert
  • 35. Time series prediction with neural networks What is happening? What is most likely to happen next? @JavaFXpert
  • 36. This is a job for a Recurrent Neural Network What is happening? What is most likely to happen next? @JavaFXpert
  • 37. Music composition with an RNN From: Music and Art Generation using Machine Learning | Curtis Hawthorne @JavaFXpert
  • 38. Predicting the most likely next note From: Music and Art Generation using Machine Learning | Curtis Hawthorne @JavaFXpert
  • 39. Playing a duet with neural networks https://aiexperiments.withgoogle.com/ai-duet/view/ @JavaFXpert
  • 40. Playing a duet with neural networks https://aiexperiments.withgoogle.com/ai-duet/view/ @JavaFXpert
  • 42. Using unsupervised learning to map artworks @JavaFXpert artsexperiments.withgoogle.com/tsnemap
  • 43. Using unsupervised learning to map words @JavaFXpert The amazing power of word vectors - Adrian Colyer word2vec vector representations of words
  • 44. Using unsupervised learning to map words @JavaFXpert The amazing power of word vectors - Adrian Colyer word2vec vector offsets for gender relationships
  • 45. Using unsupervised learning to map words @JavaFXpert The amazing power of word vectors - Adrian Colyer word2vec vector offsets for plural relationships
  • 46. Using unsupervised learning to map words @JavaFXpert The amazing power of word vectors - Adrian Colyer word2vec vector arithmetic
  • 47. word2vec vector arithmetic @JavaFXpert The amazing power of word vectors - Adrian Colyer King – Man + Woman = Queen
  • 48. Visualizing word2vec words & points @JavaFXpert using Tensorflow Embedding Projector
  • 49. Reinforcement Learning (Let's dive in now) @JavaFXpert
  • 50. Using BURLAP for Reinforcement Learning burlap.cs.brown.edu @JavaFXpert
  • 51. Learning to Navigate a Grid World with Q-Learning @JavaFXpert
  • 52. Rules of this Grid World Agent may move left, right, up, or down (actions) Reward is 0 for each move Reward is 5 for reaching top right corner (terminal state) Agent can't move into a wall or off-grid Agent doesn't have a model of the grid world. It must discover as it interacts. Challenge: Given that there is only one state that gives a reward, how can the agent work out what actions will get it to the reward? (AKA the credit assignment problem) Goal of an episode is to maximize total reward @JavaFXpert
  • 53. This Grid World's MDP ( )Markov Decision Process In this example, all actions are deterministic @JavaFXpert
  • 54. Agent learns optimal policy from interactions with the environment (s, a, r, s') Source: http://www.mdpi.com/sensors/sensors-15-06668/article_deploy/html/images/sensors-15-06668-g002-1024.png @JavaFXpert
  • 55. Visualizing training episodes From BasicBehavior example in https://github.com/jmacglashan/burlap_examples @JavaFXpert
  • 56. Expected future discounted rewards, and polices @JavaFXpert
  • 57. This example used discount factor 0.9 Low discount factors cause agent to prefer immediate rewards @JavaFXpert
  • 58. Exploration vs. Exploitation How often should the agent try new paths vs. greedily taking known paths? @JavaFXpert
  • 59. Q-Learning approach to reinforcement learning Left Right Up Down ... 2, 7 2.65 4.05 0.00 3.20 2, 8 3.65 4.50 4.50 3.65 2, 9 4.05 5.00 5.00 4.05 2, 10 4.50 4.50 5.00 3.65 ... Q-Learning table of expected values (cumulative discounted rewards) as a result of taking an action from a state and following an optimal policy. Here's an .explanation of how calculations in a Q-Learning table are performed Actions States @JavaFXpert
  • 60. Tic-Tac-Toe with Reinforcement Learning Learning to win from experience rather than by being trained @JavaFXpert
  • 61. Inspired by the Tic-Tac-Toe Example section... ...of Reinforcement Learning: An Introduction @JavaFXpert
  • 62. Tic-Tac-Toe Learning Agent and Environment X O Our learning agent is the "X" player, receiving +5 for winning, -5 for losing, and -1 for each turn The "O" player is part of the Environment. State and reward updates that it gives the Agent consider the "O" play. @JavaFXpert
  • 63. Tic-Tac-Toe state is the game board and status States 0 1 2 3 4 5 6 7 8 O I X I O X X I O, O won N/A N/A N/A N/A N/A N/A N/A N/A N/A I I I I I I O I X, in prog 1.24 1.54 2.13 3.14 2.23 3.32 N/A 1.45 N/A I I O I I X O I X, in prog 2.34 1.23 N/A 0.12 2.45 N/A N/A 2.64 N/A I I O O X X O I X, in prog +4.0 -6.0 N/A N/A N/A N/A N/A -6.0 N/A X I O I I X O I X, X won N/A N/A N/A N/A N/A N/A N/A N/A N/A ... Q-Learning table of expected values (cumulative discounted rewards) as a result of taking an action from a state and following an optimal policy Actions (Possible cells to play) Unoccupied cell represented with an I in the States column @JavaFXpert
  • 64. Tic-Tac-Toe with Reinforcement Learning https://github.com/JavaFXpert/tic-tac-toe-rl @JavaFXpert
  • 65. Through the Eyes of a Self-Driving Tesla @JavaFXpert
  • 66. Summary of links Andrew Ng video: Iris flower dataset: Visual neural net server: Visual neural net client: Deep Learning for Java: Spring initializr: A.I Duet application: Self driving car video: https://www.coursera.org/learn/machine-learning/lecture/zcAuT/welcome- to-machine-learning https://en.wikipedia.org/wiki/Iris_flower_data_set http://github.com/JavaFXpert/visual-neural-net-server http://github.com/JavaFXpert/ng2-spring-websocket-client http://deeplearning4j.org http://start.spring.io http://aiexperiments.withgoogle.com/ai-duet/view/ https://vimeo.com/192179727 @JavaFXpert
  • 67. James L. Weaver Developer Advocate jweaver@pivotal.io JavaFXpert.com @JavaFXpert Machine Learning The Fundamentals