Artificial Intelligence
Deep Learning vs Machine Learning
Machine Learning
Terminology
Core Concepts
JavaScript and AI
TensorFlow
TensorFlow JS
Examples
6. Artificial Intelligence into the action
▪ Facebook face recognition
▪ Amazon Product Recommendation
▪ Netflix movie recommendation
▪ Spotify music suggestions
▪ Gold / Stock prices prediction
▪ Alexa by Amazon
▪ Google Assistant
▪ Siri
Artificial Intelligence - An Introduction
7. ▪ Artificial Intelligence
▪ Human Intelligence Exhibited by Machines
▪ In other words
▪ intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and other animals.
▪ Artificial Intelligence is a broader Umbrella
▪ Under AI there are two major fields falls
▪ Machine Learning
▪ Deep Learning
Artificial Intelligence - An Introduction
8. ▪ Machine Learning
▪ An approach to achieve Artificial Intelligence
▪ Algorithms that parse data, learn from that data, and then apply what they’ve learned to make
informed decisions
▪ Example - On demand music service's prediction - i,e, Songs you might like...
▪ When something is capable of “Machine Learning”, it means it’s performing a function with the data
given to it, and gets progressively better at that function
▪ Deep Learning
▪ Technically a subset of Machine Learning
▪ Approach to eliminate human intervention when an ML model returns incorrect prediction.
▪ A layered structure of algorithms called an Artificial Neural Network (ANN)
▪ Example - Google Alpha GO - A deep learning powered bot to play the game of GO
Machine vs Deep Learning
12. ▪ Input Data (set)
▪ ML Term - Feature
▪ Processor Function
▪ ML Term - Model
▪ Output Data (Prediction)
▪ ML Term - Label
▪ Training
▪ Squared Loss
Machine Learning - Terminology
13. Linear Regression
▪ Statistical approach to find the relationship or plotting a common
plane for the given set of data
▪ Used to define the model function
▪ Depending on this the future predictions are going to be populated
from our model
▪ Real life scenario - the redline is not the same as per the example
▪ And it is not the most accurate predictions
Machine Learning - Fundamentals
Linear Regression
14. Loss
▪ Squared Loss
▪ L2 = (Observation - Prediction(x))^2
▪ Mean Squared Error
▪ (x, y) - x is a set of features, y is the label of the example (observation)
▪ prediction(x) - that is the function of weights and bias WRT features x
▪ D - Data containing many labeled examples
▪ N - Total number of (x, y) pair
Machine Learning - Fundamentals
16. Gradient Descent
▪ Assumption - Already have enough resources to calculate the loss of all possible features
▪ All the plotted losses for the given weight value for our linear regression problem will always be Convex in nature
▪ Inefficient for real life cases
Machine Learning - Fundamentals
17. Stochastic Gradient Descent
▪ Stochastic - One example which represents the entire data set
▪ Calculated on smallest possible batch size
▪ Fastest predictions can be drawn
▪ Less accurate
Machine Learning - Fundamentals
18. Mini-batch Gradient Descent
▪ Mini-batch gradient descent is a variation of the gradient descent algorithm that splits the training dataset into small batches
that are used to calculate model error and update model coefficients.
▪ Mini-batch sizes, commonly called “batch sizes” for brevity, are often tuned to an aspect of the computational architecture
on which the implementation is being executed. Such as a power of two that fits the memory requirements of the GPU or
CPU hardware like 32, 64, 128, 256, and so on.
Machine Learning - Fundamentals
19. Learning Rate
▪ Step size
▪ HyperParameters - knobs which we tweak in order to achive optimum learning
rate
▪ There's a Goldilocks learning (optimized one) rate for every regression
problem
Machine Learning - Fundamentals
22. Problems which comes under the adaption of AI ML
▪ Storage
▪ Computation power
▪ Time (the lesser the better)
JavaScript & AI
▪ Accuracy (which again will depend on the amount of data)
▪ Higher I/O
23. JavaScript
▪ LightWeight
▪ Less steep learning curve
▪ Non Blocking I/O (NodeJS)
▪ Being single threaded but still can handle multiple I/O simultaneously
▪ Asynchronous Execution Nature
▪ async / await approach
▪ Security
▪ Ummm, really????
▪ Intended to run remotely (on client machine)
▪ Performance
▪ PayPal adopted the NodeJS, and the facts are
▪ Node.js application development was developed at twice the rate of Java development and with fewer people
▪ The code had 33% fewer Lines of Code (LOC) and 40% fewer files
▪ A single core Node.js application handled double the requests per second when compared to five core Java application setups
▪ Lesser development time
JavaScript & AI
26. How JavaScript fits into the world of such complex data processing
▪ TensorFlow™ is an open source software library for high performance
numerical computation.
▪ TensorFlow bundles together a large number of Machine Learning and
Deep Learning (aka neural networking) models and algorithms and
makes them useful.
▪ TensorFlow allows developers to create dataflow graphs—structures that
describe how data moves through a graph, or a series of processing
nodes
TensorFlow
27. Develop ML with JavaScript
▪ Use flexible and intuitive APIs to build and train models from scratch using the low-level JavaScript
linear algebra library or the high-level layers API
Run Existing Models
▪ Use TensorFlow.js model converters to run pre-existing TensorFlow models right in the browser or
under Node.js.
Retrain Existing Models
▪ Retrain pre-existing ML models using sensor data connected to the browser, or other client-side
data.
TensorFlow.js
28. Libraries available for ML in JavaScript
▪ Brain js
▪ Synaptic
▪ Neataptic
▪ ConventJS
▪ Webdnn
▪ deeplearn.js
▪ Compromise
▪ neuro.js
▪ mljs
▪ mind
JavaScript & AI
32. THANK YOU
KNOWARTH Technologies Pvt. Ltd.
INDIA: 11, Aryan Corporate Park, Nr. Shilaj Railway Crossing, Thaltej,
Ahmedabad – 380059, Gujarat, INDIA
USA: One Commerce Center, 1201 Orange Street #600, Wilmington, DE – 19899
Email: marketing@knowarth.com | Website: www.knowarth.com