SlideShare uma empresa Scribd logo
1 de 32
www.knowarth.com
marketing@knowarth.com
JavaScript and Artificial Intelligence
Aatman Bhatt
Sagar Damani
About Us
Aatman Bhatt
▪ Consultant at KNOWARTH
▪ Passionate JS Developer / Trainer
▪ Book Worm
▪ Extremely Lazy
Facebook: atmanbhatt7
@iAatman
aatman.bhatt@knowarth.com
Sagar Damani
▪ Associate Consultant at KNOWARTH
▪ Full Stack Developer
▪ Movie and Gaming Freak
Facebook: sagar7.damani
@sagdam7
sagar.damani@knowarth.com
▪ Artificial Intelligence
▪ Deep Learning vs Machine Learning
▪ Machine Learning
▪ Terminology
▪ Core Concepts
▪ JavaScript and AI
▪ TensorFlow
▪ TensorFlow JS
▪ Examples
Agenda
What is Artificial Intelligence?
Artificial Intelligence - An Introduction
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
▪ 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
▪ 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
Machine vs Deep Learning
Artifical Intelligence Umbrella
Machine Learning
▪ Input Data (set)
▪ ML Term - Feature
▪ Processor Function
▪ ML Term - Model
▪ Output Data (Prediction)
▪ ML Term - Label
▪ Training
▪ Squared Loss
Machine Learning - Terminology
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
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
Loss Reduction
▪ Gradient Descent
▪ Stochastic Gradient Descent
▪ Mini Batch Gradient Descent
▪ Steps
Machine Learning - Fundamentals
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
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
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
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
Machine Learning - Fundamentals
JavaScript and AI
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
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
JavaScript & AI
TensorFlow
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
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
Libraries available for ML in JavaScript
▪ Brain js
▪ Synaptic
▪ Neataptic
▪ ConventJS
▪ Webdnn
▪ deeplearn.js
▪ Compromise
▪ neuro.js
▪ mljs
▪ mind
JavaScript & AI
TensorFlow JS in Action
Practical Time
Questions
#WorkHard
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

Mais conteúdo relacionado

Mais procurados

An Overview of Fusion Absence Management Absence Plan Definition and Use
An Overview of Fusion Absence Management Absence Plan Definition and UseAn Overview of Fusion Absence Management Absence Plan Definition and Use
An Overview of Fusion Absence Management Absence Plan Definition and Use
Ashish Harbhajanka
 
01_ReceiptAccounting.pdf
01_ReceiptAccounting.pdf01_ReceiptAccounting.pdf
01_ReceiptAccounting.pdf
FacundoBodner
 

Mais procurados (20)

Oracle Configurator Developer
Oracle Configurator DeveloperOracle Configurator Developer
Oracle Configurator Developer
 
SAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH SoftechSAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH Softech
 
Oracle Payables Reference Guide
Oracle Payables Reference GuideOracle Payables Reference Guide
Oracle Payables Reference Guide
 
How to make APEX print through Node.js
How to make APEX print through Node.jsHow to make APEX print through Node.js
How to make APEX print through Node.js
 
How to remove disable an oa framework personalization (doc id 304670
How to remove  disable an oa framework personalization (doc id 304670How to remove  disable an oa framework personalization (doc id 304670
How to remove disable an oa framework personalization (doc id 304670
 
R12 india localization guide
R12 india localization guideR12 india localization guide
R12 india localization guide
 
An Overview of Fusion Absence Management Absence Plan Definition and Use
An Overview of Fusion Absence Management Absence Plan Definition and UseAn Overview of Fusion Absence Management Absence Plan Definition and Use
An Overview of Fusion Absence Management Absence Plan Definition and Use
 
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building BlocksOCA Java SE 8 Exam Chapter 1 Java Building Blocks
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
 
Extensible Data Modeling
Extensible Data ModelingExtensible Data Modeling
Extensible Data Modeling
 
Oracle Supply Chain ERD Diagram.pptx
Oracle Supply Chain ERD Diagram.pptxOracle Supply Chain ERD Diagram.pptx
Oracle Supply Chain ERD Diagram.pptx
 
Oracle HRMS Proration
Oracle HRMS ProrationOracle HRMS Proration
Oracle HRMS Proration
 
Oracle APEX Cheat Sheet
Oracle APEX Cheat SheetOracle APEX Cheat Sheet
Oracle APEX Cheat Sheet
 
Unreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayUnreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - Gameplay
 
Configuring Parallel Approvers Notification
Configuring Parallel Approvers NotificationConfiguring Parallel Approvers Notification
Configuring Parallel Approvers Notification
 
SQL Server Reporting Services (SSRS) 101
 SQL Server Reporting Services (SSRS) 101 SQL Server Reporting Services (SSRS) 101
SQL Server Reporting Services (SSRS) 101
 
01_ReceiptAccounting.pdf
01_ReceiptAccounting.pdf01_ReceiptAccounting.pdf
01_ReceiptAccounting.pdf
 
How to Define a KFF(key flex field) Step by Step
How to Define a KFF(key flex field) Step by StepHow to Define a KFF(key flex field) Step by Step
How to Define a KFF(key flex field) Step by Step
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Oracle Apps INVENTORY
Oracle Apps INVENTORY Oracle Apps INVENTORY
Oracle Apps INVENTORY
 

Semelhante a JavaScript and Artificial Intelligence by Aatman & Sagar - AhmedabadJS

Parismlmeetupfinalslides 151209190037-lva1-app6892
Parismlmeetupfinalslides 151209190037-lva1-app6892Parismlmeetupfinalslides 151209190037-lva1-app6892
Parismlmeetupfinalslides 151209190037-lva1-app6892
mercedes calderon
 
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix ScaleQcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
Xavier Amatriain
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup Group
Doug Needham
 

Semelhante a JavaScript and Artificial Intelligence by Aatman & Sagar - AhmedabadJS (20)

Artificial Intelligence (ML - DL)
Artificial Intelligence (ML - DL)Artificial Intelligence (ML - DL)
Artificial Intelligence (ML - DL)
 
Python Machine Learning - Getting Started
Python Machine Learning - Getting StartedPython Machine Learning - Getting Started
Python Machine Learning - Getting Started
 
Dato Keynote
Dato KeynoteDato Keynote
Dato Keynote
 
Paris ML meetup
Paris ML meetupParis ML meetup
Paris ML meetup
 
Parismlmeetupfinalslides 151209190037-lva1-app6892
Parismlmeetupfinalslides 151209190037-lva1-app6892Parismlmeetupfinalslides 151209190037-lva1-app6892
Parismlmeetupfinalslides 151209190037-lva1-app6892
 
Is Spark the right choice for data analysis ?
Is Spark the right choice for data analysis ?Is Spark the right choice for data analysis ?
Is Spark the right choice for data analysis ?
 
Lambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big dataLambda Architecture and open source technology stack for real time big data
Lambda Architecture and open source technology stack for real time big data
 
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix ScaleQcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
Qcon SF 2013 - Machine Learning & Recommender Systems @ Netflix Scale
 
Gopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracowGopher in performance_tales_ms_go_cracow
Gopher in performance_tales_ms_go_cracow
 
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics PlatformWSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
WSO2Con EU 2015: An Introduction to the WSO2 Data Analytics Platform
 
Machine learning at scale - Webinar By zekeLabs
Machine learning at scale - Webinar By zekeLabsMachine learning at scale - Webinar By zekeLabs
Machine learning at scale - Webinar By zekeLabs
 
Keeping the fun in functional w/ Apache Spark @ Scala Days NYC
Keeping the fun in functional   w/ Apache Spark @ Scala Days NYCKeeping the fun in functional   w/ Apache Spark @ Scala Days NYC
Keeping the fun in functional w/ Apache Spark @ Scala Days NYC
 
Deep Learning - system view
Deep Learning - system viewDeep Learning - system view
Deep Learning - system view
 
Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)Amazon SageMaker 內建機器學習演算法 (Level 400)
Amazon SageMaker 內建機器學習演算法 (Level 400)
 
Neural networks with python
Neural networks with pythonNeural networks with python
Neural networks with python
 
Data Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup GroupData Science Challenge presentation given to the CinBITools Meetup Group
Data Science Challenge presentation given to the CinBITools Meetup Group
 
Cloudera Data Science Challenge
Cloudera Data Science ChallengeCloudera Data Science Challenge
Cloudera Data Science Challenge
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
In-Memory Computing - The Big Picture
In-Memory Computing - The Big PictureIn-Memory Computing - The Big Picture
In-Memory Computing - The Big Picture
 
Storage Challenges for Production Machine Learning
Storage Challenges for Production Machine LearningStorage Challenges for Production Machine Learning
Storage Challenges for Production Machine Learning
 

Mais de KNOWARTH - Software Development Company

Mais de KNOWARTH - Software Development Company (15)

Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
Migration to Liferay DXP - Digital Experience Platform | KNOWARTH
 Migration to Liferay DXP - Digital Experience Platform | KNOWARTH Migration to Liferay DXP - Digital Experience Platform | KNOWARTH
Migration to Liferay DXP - Digital Experience Platform | KNOWARTH
 
AWS for building and scaling a Lean Startup
AWS for building and scaling a Lean StartupAWS for building and scaling a Lean Startup
AWS for building and scaling a Lean Startup
 
Liferay Digital Experience (DXP): Redefining customers experience
Liferay Digital Experience (DXP): Redefining customers experienceLiferay Digital Experience (DXP): Redefining customers experience
Liferay Digital Experience (DXP): Redefining customers experience
 
Migrating Magento 1.x to Magento 2.0
Migrating Magento 1.x to Magento 2.0Migrating Magento 1.x to Magento 2.0
Migrating Magento 1.x to Magento 2.0
 
How to Simplify Enterprise Collaboration Using Enterprise Portals
How to Simplify Enterprise Collaboration Using Enterprise Portals How to Simplify Enterprise Collaboration Using Enterprise Portals
How to Simplify Enterprise Collaboration Using Enterprise Portals
 
Benefits of developing a Single Page Web Applications using AngularJS
Benefits of developing a Single Page Web Applications using AngularJSBenefits of developing a Single Page Web Applications using AngularJS
Benefits of developing a Single Page Web Applications using AngularJS
 
What is DevOps and Why do you need DevOps
What is DevOps and Why do you need DevOps What is DevOps and Why do you need DevOps
What is DevOps and Why do you need DevOps
 
Android N Features You Need to Know
Android N Features You Need to KnowAndroid N Features You Need to Know
Android N Features You Need to Know
 
Common Mistakes Incurred While Implementing ERP Solution
Common Mistakes Incurred While Implementing ERP SolutionCommon Mistakes Incurred While Implementing ERP Solution
Common Mistakes Incurred While Implementing ERP Solution
 
How Can ERP Solutions Solve the Difficulties of Local SME companies?
How Can ERP Solutions Solve the Difficulties of Local SME companies?How Can ERP Solutions Solve the Difficulties of Local SME companies?
How Can ERP Solutions Solve the Difficulties of Local SME companies?
 
How Cloud Computing is changing the Automotive Industry - KNOWARTH
How Cloud Computing is changing the Automotive Industry - KNOWARTHHow Cloud Computing is changing the Automotive Industry - KNOWARTH
How Cloud Computing is changing the Automotive Industry - KNOWARTH
 
Remote Infrastructure Management Services (RIMS)
Remote Infrastructure Management Services (RIMS)Remote Infrastructure Management Services (RIMS)
Remote Infrastructure Management Services (RIMS)
 
Benefits of Cloud Computing
Benefits of Cloud ComputingBenefits of Cloud Computing
Benefits of Cloud Computing
 
Enterprise Software Solution Provider
Enterprise Software Solution ProviderEnterprise Software Solution Provider
Enterprise Software Solution Provider
 

Ú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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 

JavaScript and Artificial Intelligence by Aatman & Sagar - AhmedabadJS

  • 2. About Us Aatman Bhatt ▪ Consultant at KNOWARTH ▪ Passionate JS Developer / Trainer ▪ Book Worm ▪ Extremely Lazy Facebook: atmanbhatt7 @iAatman aatman.bhatt@knowarth.com Sagar Damani ▪ Associate Consultant at KNOWARTH ▪ Full Stack Developer ▪ Movie and Gaming Freak Facebook: sagar7.damani @sagdam7 sagar.damani@knowarth.com
  • 3. ▪ Artificial Intelligence ▪ Deep Learning vs Machine Learning ▪ Machine Learning ▪ Terminology ▪ Core Concepts ▪ JavaScript and AI ▪ TensorFlow ▪ TensorFlow JS ▪ Examples Agenda
  • 4. What is Artificial Intelligence?
  • 5. Artificial Intelligence - An Introduction
  • 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
  • 9. 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
  • 15. Loss Reduction ▪ Gradient Descent ▪ Stochastic Gradient Descent ▪ Mini Batch Gradient Descent ▪ Steps 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
  • 20. 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
  • 29. TensorFlow JS in Action Practical Time
  • 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