Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Machine Learning Exposed!

737 views

Published on

From SpringOne Platform 2016
Speaker: James Weaver; Developer Advocate, Pivotal

The term "machine learning" is increasingly bandied about in corporate settings and cocktail parties, but what is it, really? In this session we'll answer that question, providing an approachable overview of machine learning concepts, technologies, and use cases. We'll then take a deeper dive into machine learning topics such as supervised learning, unsupervised learning, and deep learning. We'll also survey various machine learning APIs and platforms. Technologies including Spring and Cloud Foundry will be leveraged in the demos. You'll be the hit of your next party when you're able to express the near-magical inner-workings of artificial neural networks!

Published in: Technology
  • Be the first to comment

Machine Learning Exposed!

  1. 1. Machine Learning Exposed! James Weaver Developer Advocate @JavaFXpert #s1p #springone
  2. 2. From introductory video in Machine Learning course (Stanford University & Coursera) taught by Andrew Ng. @JavaFXpert
  3. 3. Self-driving cars @JavaFXpert
  4. 4. Generating image descriptions Credit: Andrej Karpathy, Li Fei-Fei h5p://cs.stanford.edu/people/karpathy/deepimagesent/ @JavaFXpert
  5. 5. Supervised Learning @JavaFXpert
  6. 6. Supervised learning regression problem (from Andrew Ng’s Machine Learning course) @JavaFXpert
  7. 7. Unsupervised Learning @JavaFXpert
  8. 8. Unsupervised learning finds structure in unlabeled data (e.g. market segment discovery, and social network analysis) @JavaFXpert
  9. 9. Reinforcement Learning @JavaFXpert
  10. 10. AlphaGo is a recent reinforcement learning success story Source: https://gogameguru.com/i/2016/03/AlphaGo-Lee-Sedol-game-3-game-over.jpg@JavaFXpert
  11. 11. Supervised learning classification problem (using the Iris flower data set) Sepal length Sepal width Petal length Petal width Species 5.1 3.5 1.4 0.2 Iris setosa 4.9 3.0 1.4 0.2 Iris setosa 7.0 3.2 4.7 1.4 Iris versicolor 6.4 3.2 4.5 1.5 Iris versicolor 6.3 3.3 6.0 2.5 Iris virginica 5.8 3.3 6.0 2.5 Iris virginica Features Labels Training / test data @JavaFXpert
  12. 12. Iris data classified in four dimensions Sepal length Sepal width Petal length Petal width Species 5.1 3.5 1.4 0.2 Iris setosa 4.9 3.0 1.4 0.2 Iris setosa 7.0 3.2 4.7 1.4 Iris versicolor 6.4 3.2 4.5 1.5 Iris versicolor 6.3 3.3 6.0 2.5 Iris virginica 5.8 3.3 6.0 2.5 Iris virginica Credit: Tal Galili h5ps://cran.r-project.org/web/packages/dendextend/vigne5es/Cluster_Analysis.html Features Labels Training / test data @JavaFXpert
  13. 13. Modeling the brain works well with machine learning (ya think?) (inputs) (output) @JavaFXpert
  14. 14. Anatomy of an Artificial Neural Network (aka Deep Belief Network when multiple hidden layers) Input layer Output layerHidden layers @JavaFXpert
  15. 15. Neural net visualization app (uses Spring and DL4J) https://github.com/JavaFXpert/visual-neural-net-server https://github.com/JavaFXpert/ng2-spring-websocket-client @JavaFXpert
  16. 16. Entering feature values for prediction (classification) @JavaFXpert
  17. 17. Visual Neural Network application architecture Spring makes REST services and WebSockets easy as π Neural Net Model Listener HTML5 client (angular 2 & visjs) DeepLearning4j library Neural net graph (WebSocket) Prediction REST service prediction & activations Model Selection Handler connect & subscribe (WebSocket) @JavaFXpert
  18. 18. @JavaFXpert The app leverages machine learning library found at deeplearning4j.org
  19. 19. Simple neural network trained for XOR logic forward propagation @JavaFXpert
  20. 20. Feedforward calculations with XOR example For each layer: (1 x 8.54) + (0 x 8.55) = 8.54 1 / (1 + e -4.55 ) = 0.99 Use sigmoid activation function: Multiply inputs by weights: Add bias: 8.54 + (-3.99) = 4.55 @JavaFXpert
  21. 21. Simple neural network trained for XOR logic back propagation (minimize cost function) @JavaFXpert
  22. 22. Back propagation Uses gradient descent to iteratively minimize the cost function @JavaFXpert
  23. 23. @JavaFXpert kaggle.com is a great website for data science and machine learning enthusiasts
  24. 24. @JavaFXpert Let’s use a dataset from kaggle.com to train a neural net on speed dating
  25. 25. Identify features and label we’ll use in the model Let’s use 65% of the 8378 rows for training and 35% for testing @JavaFXpert
  26. 26. Code that configures our speed dating neural net @JavaFXpert
  27. 27. Trying our new speed dating neural net example @JavaFXpert
  28. 28. Making predictions with our speed dating neural net Note that input layer neuron values are normalized @JavaFXpert
  29. 29. Machine Learning Exposed! James Weaver Developer Advocate @JavaFXpert #s1p #springone (Thanks for your kind attention)

×