SlideShare a Scribd company logo
Presented by
Date
Event
Data Analytics and
Machine Learning: From
Node to Cluster
Understanding use cases to optimize on
ARM Ecosystem
Viswanath Puttagunta
Ganesh Raju
BKK16-404B
March 10th, 2016
Linaro Connect BKK16
Version 0.1
Vish Puttagunta
● Technical Program
Manager, Linaro
● DSP (TI C64x) optimizations
(Image / Signal Processing)
● ARM®
NEON™
optimizations upstreamed to
opus audio codec
● Data Analysis and Machine
Learning: Why ARM
Ganesh Raju
● Tech Lead, Big Data, Linaro
● Brings in Enterprise
experience in implementing
Big Data solutions
Data Science: Big Picture
Data
Analytics
Machine
Learning
Deep
Learning
High
Performance
Computing
(HPC)
Big Data
Statistics
Lin/Log Reg
KNN, Decision
Trees,PCA...
Software Tools
Python,R..
Pandas, scikit-learn, nltk..
Caffe, TensorFlow..
Spark, MLlib, Hadoop..
Deep
Learning/NN
CNN
RNN..
Data
Science
● Value Prediction
● Classification
● Transformation
● Correlations
● Causalities
● Wrangling...
Overview
● Basic Data Science use cases
● Pandas Library(Python)
○ Time Series, Correlations, Risk Analysis
● Supervised Learning
○ scikit-learn Library (Python)
● Understand operations done repeatedly
● Open discussion for next steps:
○ Profile, Optimize (ARM Neon, OpenCL, OpenMP..) on
a single machine.
○ Scale beyond a single machine
● Ref: https://github.com/viswanath-puttagunta/bkk16_MLPrimer
Goal
● Make the tools and operations work out of the
box on ARM
○ ARM Neon, OpenCL, OpenMP.
○ ‘pip install’ should just work :)
● Why Now? (Hint: Spark)
Pandas Data Analysis (Pandas)
● Origins in Finance for Data Manipulation and
Analysis (Python Library)
● DataFrame object
● Repeat Computations:
○ Means, Min, Max, Percentage Changes
○ Standard Deviation
○ Differentiation (Shift and subtract)
○ ...
Op: Rolling Mean (Pandas)
Op: Percentage Change (Pandas)
Operations: Shift, Subtract, Divide
Op: Percentage Change Vs Risk (Variance)
Op: Correlation (Pandas)
Operations: Mean, Variance, Square Root
Pearson Correlation Coef
Source: https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
Correlation Heat Maps
Linear Regression (Predictor)
Objective: Fit line/curve to minimize a cost function
Linear Regression (Predictor)...
Operations: Gradient Descent: Matrix Transforms/Inverse/Multiplications.
For Lnr Reg, directly reduces to:
Θ = (XT
X)-1
XT
Y
Source: https://www.youtube.com/watch?v=SqA6TujbmWw&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf&index=16
https://youtu.be/WnqQrPNYz5Q?list=PLaXDtXvwY-oDvedS3f4HW0b4KxqpJ_imw&t=284
Logistic Regression (Classification)
Operations: Matrix Transforms/Inverse/Multiplications.
Source: https://www.youtube.com/watch?v=Zc7ouSD0DEQ&index=27&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf
Artificial Neural Networks (Eg: Predictor)
Objective: Compute parameters to minimize a cost function
Operations: Matrix Transforms/Inverse/Multiplications, Dot Products...
Source: https://www.yout.ube.com/watch?v=bxe2T-V8XRs
Bayesian Classifiers
Operations (Training): Mean, Standard Deviations, Logs, binning/compare(/histograms)
Note: Some variations based on assumptions on variance (LDA, QDA)
Source: An Introduction to Statistical Learning with Applications in R (Springer Texts)
K-Nearest Neighbors (Classifier)
Operations: Euclidean Distance Computations
Note: K is tunable. Typical to repeat computations for lot of k values
Decision Tree (Predictors & Classifiers)
Operations: Each split done so that
Predictor: Minimize Root Mean Square Error
Classifier: Minimize Gini Index (Note: depth tunable)
Bagging / Random Forests
Operations: Each tree similar to Decision Tree
Note: Typical to see about 200 to 300 trees to stabilize.
Source: An Introduction to Statistical Learning with Applications in R (Springer Texts)
Segway to Spark
● So far, on a single machine with lots of RAM and
compute.
○ How to scale to a cluster
● So far, data from simple csv files
○ How to acquire/clean data on large scale
Discussion
● OpenCL (Deep Learning)
○ Acceleration using GPU, DSPs
○ Outside of Deep Learning: GPU? (scikit-learn faq)
○ But what about Shamrock? OpenCL backend on CPU.
○ Port CUDA kernels into OpenCL kernels in various projects?
● ARM NEON
○ Highly scalable
● OpenMP?
● Tools to profile end-to-end use cases?
○ Perf..
Backup Slides
● Text Analytics
○ Sparse Matrices and operations
○ Word counts (Naive Bayes)
● Libraries (Python)
○ sklearn (No GPU Support!! FAQ)
○ gensim (Text Analytics)
○ TensorFlowTM
(GPU backend available)
○ Caffe (GPU backend available)
○ Theano (GPU backend available)
Presented by
Date
Event
Data science in Distributed
Environment
Ganesh Raju
Tech Lead, Big Data
Linaro
Thursday 10 March 2016
BKK16
Overview
1. Review of Data Science in Single Node
2. Data Science in Distributed Environment
a. Hadoop and its limitations
3. Data Science using Apache Spark
a. Spark Ecosystem
b. Spark ML
c. Spark Streaming
d. Spark 2.0 and Roadmap
4. Q & A
Hadoop Vs Spark
80+ operators compared to 2 operators in Hadoop
Hadoop and its limitations
Spark - Unified Platform
source: www.databricks.com
Machine Learning Data Pipeline
Why in Spark:
● Machine learning algorithms are
○ Complex, multi-stage
○ Iterative
● MapReduce/Hadoop unsuitable
source: http://www.slideshare.net/databricks/2015-0317-scala-days
Spark is In-Memory and Fast
Apache Spark Stack
Unified Engine across diverse workloads and Environments
R Python Scala Java
Spark Core API
Spark SQL +
DataFrames
Streaming MLib / ML
Machine Learning
GraphX
Graph Computation
Spark Core
Internals
SparkContext connects to a cluster manager Obtains executors on cluster nodes Sends app code to
them Sends task to the executors
Driver Program
Cluster Manager
Worker Node
Executor
Worker Node
Cluster
Spark Context
Scheduler
Scheduler
Task
Cache
Task
Executor
Task
Cache
Task
Application Code Distribution
● PySpark enables developers to write driver programs in Python
● Application code is serialized and sent to the worker nodes
● Execution happens in native language (Python/R)
SparkContext
Driver Py4J
Java
Spark
Context
File system
Worker
Node
Worker
Node
Cluster
Python
Python
Python
Python
Python
Python
Pipe
Socket
Apache Spark MLlib / ML Algorithms Supported:
● Classification: Logistic Regression, Linear SVM, Naive Bayes, classification tree
● Regression: Generalized Linear Models (GLMs), Regression Tree
● Collaborative Filtering: Alternating Least Squares (ALS), Non-Negative Matrix Factorization (NMF)
● Clustering: K-Means
● Decomposition: SVD, PCA
● Optimization: Stochastic Gradient Descent (SGD), L-BFGS
Spark Streaming
● Run a streaming computation as a series of very small, deterministic batch jobs
○ Live data streaming is converted into micro batches of input. Batch can be of ½ sec latency.
○ Each batch is processed in Spark
○ Output is returned as micro batches
○ Potential for combining batch and streaming processing.
● Linear models can be trained in streaming fashion
● Model weights can be updated via SGD, thus amenable to streaming
● Consistent API
● Scalable
Apache Spark
General-purpose cluster computing system
● Unified End-to-End data pipeline platform with support for Machine Learning, Streaming, SQL and
Graph Pipelines
● Fast and Expressive Cluster Computing Engine. No Intermediate storage. In-memory Processing. Run
programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk.
● Rich higher level APIs in Scala, Python, R, Java. Typically less code (2-5x)
● REPL
● Interoperability with other ecosystem components
○ Mesos, YARN
○ EC2, EMR
○ HDFS, S3,
○ HBase, Cassandra, Parquet, Hive, JSON, ElasticSearch
Source: https://databricks.com/blog/2015/04/28/project-tungsten-bringing-spark-closer-to-bare-metal.html
Tungsten Phase 2
speedups of 5-10x
Structured Streaming
real-time engine on
SQL / DataFrames
Unifying Datasets
and DataFrames
Major Features in 2.0 - Project Tungsten
Focus on CPU and Memory Optimization
Code Generation
● Runtime Code Generation by dynamically generating bytecode during evaluation and eliminating Java boxing of primitive data types
● Faster serializer and compression on dataformat like Parquet.
Manual Memory Management and Binary Processing
● Off heap memory management. Avoiding non-transient Java objects (store them in binary format), which reduces GC overhead.
● Minimizing memory usage through denser in-memory data format, with less spill (I/O)
● Better memory accounting (size of bytes) rather than relying on heuristics
● For operators that understand data types (in the case of DataFrames and SQL), work directly against binary format in memory, i.e. have
no serialization/deserialization
Cache-aware Computation
● Exploiting cache locality. Faster sorting and hashing for aggregations, joins, and shuffle
Spark 2.0 - Project Tungsten features
Unified API, One Engine, Automatically Optimized
PythonSQL Java/Scala R ...
DataFrame
Logical Plan
Language
Frontend
LLVMJVM GPU NVRAM SSE/SIMD
Tungsten
Backend
...OpenCL
Apache Spark Roadmap
.
● Use LLVM for compilation
● Re-implement parallelizable code using OpenCL/SSE/SIMD to utilize underlying CPU / GPU advancements
towards machine learning.
Spark slave nodes can achieve better performance and energy efficiency if with GPU acceleration by doing further data parallelization and
algorithm acceleration.
De facto Analytics Platform
source: www.databricks.com
Q & A

More Related Content

What's hot (20)

PDF
A Library for Emerging High-Performance Computing Clusters
Intel® Software
 
PDF
How to Share State Across Multiple Apache Spark Jobs using Apache Ignite with...
Spark Summit
 
PDF
CUDA performance study on Hadoop MapReduce Cluster
airbots
 
PDF
Easy and High Performance GPU Programming for Java Programmers
Kazuaki Ishizaki
 
PPTX
Advanced spark deep learning
Adam Gibson
 
PDF
myHadoop 0.30
Glenn K. Lockwood
 
PPT
Hadoop for Scientific Workloads__HadoopSummit2010
Yahoo Developer Network
 
PPTX
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
PPTX
Parallel Linear Regression in Interative Reduce and YARN
DataWorks Summit
 
PPTX
Bringing complex event processing to Spark streaming
DataWorks Summit
 
PDF
Making Hardware Accelerator Easier to Use
Kazuaki Ishizaki
 
PPTX
Mmap failure analysis
Vipin Varghese
 
PPTX
20140708hcj
Hatayama Hideharu
 
PDF
Deep Learning on ARM Platforms - SFO17-509
Linaro
 
PDF
A PCIe Congestion-Aware Performance Model for Densely Populated Accelerator S...
inside-BigData.com
 
PDF
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Jim Dowling
 
PDF
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Intel® Software
 
PDF
Unleashing Data Intelligence with Intel and Apache Spark with Michael Greene
Databricks
 
PDF
Migrating to Apache Spark at Netflix
Databricks
 
PDF
Scalable Algorithm Design with MapReduce
Pietro Michiardi
 
A Library for Emerging High-Performance Computing Clusters
Intel® Software
 
How to Share State Across Multiple Apache Spark Jobs using Apache Ignite with...
Spark Summit
 
CUDA performance study on Hadoop MapReduce Cluster
airbots
 
Easy and High Performance GPU Programming for Java Programmers
Kazuaki Ishizaki
 
Advanced spark deep learning
Adam Gibson
 
myHadoop 0.30
Glenn K. Lockwood
 
Hadoop for Scientific Workloads__HadoopSummit2010
Yahoo Developer Network
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
Parallel Linear Regression in Interative Reduce and YARN
DataWorks Summit
 
Bringing complex event processing to Spark streaming
DataWorks Summit
 
Making Hardware Accelerator Easier to Use
Kazuaki Ishizaki
 
Mmap failure analysis
Vipin Varghese
 
20140708hcj
Hatayama Hideharu
 
Deep Learning on ARM Platforms - SFO17-509
Linaro
 
A PCIe Congestion-Aware Performance Model for Densely Populated Accelerator S...
inside-BigData.com
 
Scaling out Tensorflow-as-a-Service on Spark and Commodity GPUs
Jim Dowling
 
Use C++ and Intel® Threading Building Blocks (Intel® TBB) for Hardware Progra...
Intel® Software
 
Unleashing Data Intelligence with Intel and Apache Spark with Michael Greene
Databricks
 
Migrating to Apache Spark at Netflix
Databricks
 
Scalable Algorithm Design with MapReduce
Pietro Michiardi
 

Viewers also liked (15)

PDF
Learning Analytics
Stian Håklev
 
PDF
Top 3 Challenges to Profitable Mortgage Lending
Equifax
 
PDF
Graph analytic and machine learning
Stanley Wang
 
PDF
[Harvard CS264] 09 - Machine Learning on Big Data: Lessons Learned from Googl...
npinto
 
PDF
Top 3 Considerations for Machine Learning on Big Data
Datameer
 
PPTX
Predictive Analytics and Machine Learning 101
Poya Manouchehri
 
PDF
Intro au Big Data & Machine Learning
Eric Daoud
 
PPTX
"From Big Data To Big Valuewith HPE Predictive Analytics & Machine Learning",...
Dataconomy Media
 
PDF
Best Practices for Big Data Analytics with Machine Learning by Datameer
Datameer
 
PDF
Cursos de Big Data y Machine Learning
Stratebi
 
PDF
Machine Learning for Actuaries
Arthur Charpentier
 
PDF
How to Apply Big Data Analytics and Machine Learning to Real Time Processing ...
Codemotion
 
PDF
Big Data: Introducing BigInsights, IBM's Hadoop- and Spark-based analytical p...
Cynthia Saracco
 
PPTX
Big Data and Advanced Analytics
McKinsey on Marketing & Sales
 
PPTX
Introduction to Big Data/Machine Learning
Lars Marius Garshol
 
Learning Analytics
Stian Håklev
 
Top 3 Challenges to Profitable Mortgage Lending
Equifax
 
Graph analytic and machine learning
Stanley Wang
 
[Harvard CS264] 09 - Machine Learning on Big Data: Lessons Learned from Googl...
npinto
 
Top 3 Considerations for Machine Learning on Big Data
Datameer
 
Predictive Analytics and Machine Learning 101
Poya Manouchehri
 
Intro au Big Data & Machine Learning
Eric Daoud
 
"From Big Data To Big Valuewith HPE Predictive Analytics & Machine Learning",...
Dataconomy Media
 
Best Practices for Big Data Analytics with Machine Learning by Datameer
Datameer
 
Cursos de Big Data y Machine Learning
Stratebi
 
Machine Learning for Actuaries
Arthur Charpentier
 
How to Apply Big Data Analytics and Machine Learning to Real Time Processing ...
Codemotion
 
Big Data: Introducing BigInsights, IBM's Hadoop- and Spark-based analytical p...
Cynthia Saracco
 
Big Data and Advanced Analytics
McKinsey on Marketing & Sales
 
Introduction to Big Data/Machine Learning
Lars Marius Garshol
 
Ad

Similar to BKK16-404B Data Analytics and Machine Learning- from Node to Cluster (20)

PDF
Deep Learning on Apache® Spark™: Workflows and Best Practices
Databricks
 
PDF
Deep Learning on Apache® Spark™ : Workflows and Best Practices
Jen Aman
 
PDF
Deep Learning on Apache® Spark™: Workflows and Best Practices
Jen Aman
 
PDF
End-to-end Data Pipeline with Apache Spark
Databricks
 
PDF
Spark Based Distributed Deep Learning Framework For Big Data Applications
Humoyun Ahmedov
 
PDF
Big Data Analytics (ML, DL, AI) hands-on
Dony Riyanto
 
PPTX
My Master's Thesis
Humoyun Ahmedov
 
PDF
Machine learning and big data @ uber a tale of two systems
Zhenxiao Luo
 
PPTX
Next generation analytics with yarn, spark and graph lab
Impetus Technologies
 
PDF
Apache Spark for Everyone - Women Who Code Workshop
Amanda Casari
 
PPTX
In Memory Analytics with Apache Spark
Venkata Naga Ravi
 
PDF
Project Hydrogen: State-of-the-Art Deep Learning on Apache Spark
Databricks
 
PDF
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
PDF
New Developments in Spark
Databricks
 
PPTX
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
Jose Quesada (hiring)
 
PDF
Bds session 13 14
Infinity Tech Solutions
 
PDF
Introduction to Spark Training
Spark Summit
 
PPTX
Yarn spark next_gen_hadoop_8_jan_2014
Vijay Srinivas Agneeswaran, Ph.D
 
PDF
Scaling Machine Learning To Billions Of Parameters
Jen Aman
 
PDF
Scaling Machine Learning to Billions of Parameters - Spark Summit 2016
Badri Narayan Bhaskar
 
Deep Learning on Apache® Spark™: Workflows and Best Practices
Databricks
 
Deep Learning on Apache® Spark™ : Workflows and Best Practices
Jen Aman
 
Deep Learning on Apache® Spark™: Workflows and Best Practices
Jen Aman
 
End-to-end Data Pipeline with Apache Spark
Databricks
 
Spark Based Distributed Deep Learning Framework For Big Data Applications
Humoyun Ahmedov
 
Big Data Analytics (ML, DL, AI) hands-on
Dony Riyanto
 
My Master's Thesis
Humoyun Ahmedov
 
Machine learning and big data @ uber a tale of two systems
Zhenxiao Luo
 
Next generation analytics with yarn, spark and graph lab
Impetus Technologies
 
Apache Spark for Everyone - Women Who Code Workshop
Amanda Casari
 
In Memory Analytics with Apache Spark
Venkata Naga Ravi
 
Project Hydrogen: State-of-the-Art Deep Learning on Apache Spark
Databricks
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
New Developments in Spark
Databricks
 
A full Machine learning pipeline in Scikit-learn vs in scala-Spark: pros and ...
Jose Quesada (hiring)
 
Bds session 13 14
Infinity Tech Solutions
 
Introduction to Spark Training
Spark Summit
 
Yarn spark next_gen_hadoop_8_jan_2014
Vijay Srinivas Agneeswaran, Ph.D
 
Scaling Machine Learning To Billions Of Parameters
Jen Aman
 
Scaling Machine Learning to Billions of Parameters - Spark Summit 2016
Badri Narayan Bhaskar
 
Ad

More from Linaro (20)

PDF
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
PDF
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Linaro
 
PDF
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Linaro
 
PDF
Bud17 113: distribution ci using qemu and open qa
Linaro
 
PDF
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
Linaro
 
PDF
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
PDF
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Linaro
 
PDF
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
PDF
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Linaro
 
PDF
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
PDF
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
PDF
HKG18-318 - OpenAMP Workshop
Linaro
 
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
PDF
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
Linaro
 
PDF
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
PDF
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
PDF
HKG18-113- Secure Data Path work with i.MX8M
Linaro
 
PPTX
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
PPTX
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Linaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Linaro
 
Bud17 113: distribution ci using qemu and open qa
Linaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
HKG18-318 - OpenAMP Workshop
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-113- Secure Data Path work with i.MX8M
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Recently uploaded (20)

PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

BKK16-404B Data Analytics and Machine Learning- from Node to Cluster

  • 1. Presented by Date Event Data Analytics and Machine Learning: From Node to Cluster Understanding use cases to optimize on ARM Ecosystem Viswanath Puttagunta Ganesh Raju BKK16-404B March 10th, 2016 Linaro Connect BKK16 Version 0.1
  • 2. Vish Puttagunta ● Technical Program Manager, Linaro ● DSP (TI C64x) optimizations (Image / Signal Processing) ● ARM® NEON™ optimizations upstreamed to opus audio codec ● Data Analysis and Machine Learning: Why ARM Ganesh Raju ● Tech Lead, Big Data, Linaro ● Brings in Enterprise experience in implementing Big Data solutions
  • 3. Data Science: Big Picture Data Analytics Machine Learning Deep Learning High Performance Computing (HPC) Big Data Statistics Lin/Log Reg KNN, Decision Trees,PCA... Software Tools Python,R.. Pandas, scikit-learn, nltk.. Caffe, TensorFlow.. Spark, MLlib, Hadoop.. Deep Learning/NN CNN RNN.. Data Science ● Value Prediction ● Classification ● Transformation ● Correlations ● Causalities ● Wrangling...
  • 4. Overview ● Basic Data Science use cases ● Pandas Library(Python) ○ Time Series, Correlations, Risk Analysis ● Supervised Learning ○ scikit-learn Library (Python) ● Understand operations done repeatedly ● Open discussion for next steps: ○ Profile, Optimize (ARM Neon, OpenCL, OpenMP..) on a single machine. ○ Scale beyond a single machine ● Ref: https://github.com/viswanath-puttagunta/bkk16_MLPrimer
  • 5. Goal ● Make the tools and operations work out of the box on ARM ○ ARM Neon, OpenCL, OpenMP. ○ ‘pip install’ should just work :) ● Why Now? (Hint: Spark)
  • 6. Pandas Data Analysis (Pandas) ● Origins in Finance for Data Manipulation and Analysis (Python Library) ● DataFrame object ● Repeat Computations: ○ Means, Min, Max, Percentage Changes ○ Standard Deviation ○ Differentiation (Shift and subtract) ○ ...
  • 7. Op: Rolling Mean (Pandas)
  • 8. Op: Percentage Change (Pandas) Operations: Shift, Subtract, Divide
  • 9. Op: Percentage Change Vs Risk (Variance)
  • 10. Op: Correlation (Pandas) Operations: Mean, Variance, Square Root Pearson Correlation Coef Source: https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
  • 12. Linear Regression (Predictor) Objective: Fit line/curve to minimize a cost function
  • 13. Linear Regression (Predictor)... Operations: Gradient Descent: Matrix Transforms/Inverse/Multiplications. For Lnr Reg, directly reduces to: Θ = (XT X)-1 XT Y Source: https://www.youtube.com/watch?v=SqA6TujbmWw&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf&index=16 https://youtu.be/WnqQrPNYz5Q?list=PLaXDtXvwY-oDvedS3f4HW0b4KxqpJ_imw&t=284
  • 14. Logistic Regression (Classification) Operations: Matrix Transforms/Inverse/Multiplications. Source: https://www.youtube.com/watch?v=Zc7ouSD0DEQ&index=27&list=PLE6Wd9FR--Ecf_5nCbnSQMHqORpiChfJf
  • 15. Artificial Neural Networks (Eg: Predictor) Objective: Compute parameters to minimize a cost function Operations: Matrix Transforms/Inverse/Multiplications, Dot Products... Source: https://www.yout.ube.com/watch?v=bxe2T-V8XRs
  • 16. Bayesian Classifiers Operations (Training): Mean, Standard Deviations, Logs, binning/compare(/histograms) Note: Some variations based on assumptions on variance (LDA, QDA) Source: An Introduction to Statistical Learning with Applications in R (Springer Texts)
  • 17. K-Nearest Neighbors (Classifier) Operations: Euclidean Distance Computations Note: K is tunable. Typical to repeat computations for lot of k values
  • 18. Decision Tree (Predictors & Classifiers) Operations: Each split done so that Predictor: Minimize Root Mean Square Error Classifier: Minimize Gini Index (Note: depth tunable)
  • 19. Bagging / Random Forests Operations: Each tree similar to Decision Tree Note: Typical to see about 200 to 300 trees to stabilize. Source: An Introduction to Statistical Learning with Applications in R (Springer Texts)
  • 20. Segway to Spark ● So far, on a single machine with lots of RAM and compute. ○ How to scale to a cluster ● So far, data from simple csv files ○ How to acquire/clean data on large scale
  • 21. Discussion ● OpenCL (Deep Learning) ○ Acceleration using GPU, DSPs ○ Outside of Deep Learning: GPU? (scikit-learn faq) ○ But what about Shamrock? OpenCL backend on CPU. ○ Port CUDA kernels into OpenCL kernels in various projects? ● ARM NEON ○ Highly scalable ● OpenMP? ● Tools to profile end-to-end use cases? ○ Perf..
  • 22. Backup Slides ● Text Analytics ○ Sparse Matrices and operations ○ Word counts (Naive Bayes) ● Libraries (Python) ○ sklearn (No GPU Support!! FAQ) ○ gensim (Text Analytics) ○ TensorFlowTM (GPU backend available) ○ Caffe (GPU backend available) ○ Theano (GPU backend available)
  • 23. Presented by Date Event Data science in Distributed Environment Ganesh Raju Tech Lead, Big Data Linaro Thursday 10 March 2016 BKK16
  • 24. Overview 1. Review of Data Science in Single Node 2. Data Science in Distributed Environment a. Hadoop and its limitations 3. Data Science using Apache Spark a. Spark Ecosystem b. Spark ML c. Spark Streaming d. Spark 2.0 and Roadmap 4. Q & A
  • 25. Hadoop Vs Spark 80+ operators compared to 2 operators in Hadoop
  • 26. Hadoop and its limitations
  • 27. Spark - Unified Platform source: www.databricks.com
  • 28. Machine Learning Data Pipeline Why in Spark: ● Machine learning algorithms are ○ Complex, multi-stage ○ Iterative ● MapReduce/Hadoop unsuitable
  • 30. Apache Spark Stack Unified Engine across diverse workloads and Environments R Python Scala Java Spark Core API Spark SQL + DataFrames Streaming MLib / ML Machine Learning GraphX Graph Computation
  • 31. Spark Core Internals SparkContext connects to a cluster manager Obtains executors on cluster nodes Sends app code to them Sends task to the executors Driver Program Cluster Manager Worker Node Executor Worker Node Cluster Spark Context Scheduler Scheduler Task Cache Task Executor Task Cache Task
  • 32. Application Code Distribution ● PySpark enables developers to write driver programs in Python ● Application code is serialized and sent to the worker nodes ● Execution happens in native language (Python/R) SparkContext Driver Py4J Java Spark Context File system Worker Node Worker Node Cluster Python Python Python Python Python Python Pipe Socket
  • 33. Apache Spark MLlib / ML Algorithms Supported: ● Classification: Logistic Regression, Linear SVM, Naive Bayes, classification tree ● Regression: Generalized Linear Models (GLMs), Regression Tree ● Collaborative Filtering: Alternating Least Squares (ALS), Non-Negative Matrix Factorization (NMF) ● Clustering: K-Means ● Decomposition: SVD, PCA ● Optimization: Stochastic Gradient Descent (SGD), L-BFGS
  • 34. Spark Streaming ● Run a streaming computation as a series of very small, deterministic batch jobs ○ Live data streaming is converted into micro batches of input. Batch can be of ½ sec latency. ○ Each batch is processed in Spark ○ Output is returned as micro batches ○ Potential for combining batch and streaming processing. ● Linear models can be trained in streaming fashion ● Model weights can be updated via SGD, thus amenable to streaming ● Consistent API ● Scalable
  • 35. Apache Spark General-purpose cluster computing system ● Unified End-to-End data pipeline platform with support for Machine Learning, Streaming, SQL and Graph Pipelines ● Fast and Expressive Cluster Computing Engine. No Intermediate storage. In-memory Processing. Run programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk. ● Rich higher level APIs in Scala, Python, R, Java. Typically less code (2-5x) ● REPL ● Interoperability with other ecosystem components ○ Mesos, YARN ○ EC2, EMR ○ HDFS, S3, ○ HBase, Cassandra, Parquet, Hive, JSON, ElasticSearch
  • 36. Source: https://databricks.com/blog/2015/04/28/project-tungsten-bringing-spark-closer-to-bare-metal.html Tungsten Phase 2 speedups of 5-10x Structured Streaming real-time engine on SQL / DataFrames Unifying Datasets and DataFrames Major Features in 2.0 - Project Tungsten
  • 37. Focus on CPU and Memory Optimization Code Generation ● Runtime Code Generation by dynamically generating bytecode during evaluation and eliminating Java boxing of primitive data types ● Faster serializer and compression on dataformat like Parquet. Manual Memory Management and Binary Processing ● Off heap memory management. Avoiding non-transient Java objects (store them in binary format), which reduces GC overhead. ● Minimizing memory usage through denser in-memory data format, with less spill (I/O) ● Better memory accounting (size of bytes) rather than relying on heuristics ● For operators that understand data types (in the case of DataFrames and SQL), work directly against binary format in memory, i.e. have no serialization/deserialization Cache-aware Computation ● Exploiting cache locality. Faster sorting and hashing for aggregations, joins, and shuffle Spark 2.0 - Project Tungsten features
  • 38. Unified API, One Engine, Automatically Optimized PythonSQL Java/Scala R ... DataFrame Logical Plan Language Frontend LLVMJVM GPU NVRAM SSE/SIMD Tungsten Backend ...OpenCL
  • 39. Apache Spark Roadmap . ● Use LLVM for compilation ● Re-implement parallelizable code using OpenCL/SSE/SIMD to utilize underlying CPU / GPU advancements towards machine learning. Spark slave nodes can achieve better performance and energy efficiency if with GPU acceleration by doing further data parallelization and algorithm acceleration.
  • 40. De facto Analytics Platform source: www.databricks.com
  • 41. Q & A