Machine Learning in JavaScript - Sisense · PDF fileMachine Learning with JavaScript Boaz...
Transcript of Machine Learning in JavaScript - Sisense · PDF fileMachine Learning with JavaScript Boaz...
Machine Learningwith JavaScript
Boaz FarkashDirector of Product Management @ Sisense
Agenda
• Why I am interested in this?
• Why you should be interested in this
• What is ML?
• Why JS developers should tackle ML
• Examples
• Other ML JS Libraries
• What’s next for you?
Why am I interested in this?
• I work here:
• Javascript Background
• Worked on R integration with BI
• Backend vs Frontend – Who has the right to attempt ML?
Why JS developers should tackle ML
• Why not?
• JS developers are very practical
• Unlike data scientists
• More practical than backend developers
• When something is possible with Javascript, the path to making it accessible to end-users is the shortest.
• JS developers are becoming full-stack developers
Why JS developers should tackle ML
ML with JS is
not slow!
Why JS developers should tackle ML
• ML with JS is not slower than R/Python
• NodeJS
• Webworkers
• C/C++ where speed is crucial
• JS keeps evolving rapidly
• More adoption
• WebAssembly on the horizon
WebAssembly Expected Improvements
• Full threading support
• SIMD types and intrinsics
• Zero-cost exceptions
• Coroutines
• Dynamic linking
• DOM integration
• Integrated garbage collection
• Tail-call optimization
• Multi-process support
• Started by Mozilla developers
• Became joint effort between Google, Microsoft, Mozilla
& Apple
• The bytecode of the web
• Drastically faster
• Will complement JS with capabilities it doesn’t have and
don’t play well with JS semantics
• Web developers will tackler even more complex
problems, like ML
Example #1
• Created by Heather Arthur (harthur on Github)
• Should I bother?
Neural Networks with “brain”
Choosing the right input
PixelsvsEdges
Train a 1000 cats
Identify new cats
See it
Example #2
• Created by Amir Arad
• Should I swim?
Train 6000 sharks
http://www.sharkattackfile.net/incidentlog.htm
Consider going for a swim
A youngAmericanFemaleSurfer Has this chance to survive:0.6759295781730543A oldAustralianMaleSurfer Has this chance to survive:0.3966031586730335A youngIndianFemaleSwimmer Has this chance to survive:0.6760293212564229A youngAustralianMaleBoater Has this chance to survive:0.3945805472407228
Other ML JS Libraries
• machine_learning• Logistic Regression• MLP (Multi-Layer Perceptron)• SVM (Support Vector Machine)• KNN (K-nearest neighbors)• K-means clustering• 3 Optimization Algorithms (Hill-Climbing,
Simulated Annealing, Genetic Algorithm)• Decision Tree• NMF (non-negative matrix factorization)
• Clusterfck - K-Means & Hierarchical
Clustering
• limdu.js• Multi-label classification
• Online learning
• Real-time classification
• forestjs – Random forrest
• Dclassify - Naïve Bayes
• convnetjs - convolutional neural networks
• linearReg.js – Linear regression
• SVMjs
What’s next for you?
• If you work with / employ data scientists
• Tie the bond between Data Scientists & JS developers
• Data scientists should empower JS developers by helping them implement ML algorithms in JS.
• It is in the Data Scientists interest that JS developers can work on ML applications, while they work on ML research.
• If you are a JS developer just getting started with ML
• Do not be afraid not to learn R/Python
• Leverage existing libraries and contribute
Thank You