SlideShare a Scribd company logo
Building Machine Learning Systems in
Apex
Jen Wyher
Technical Architect
@jenwyher
Paul Battisson
Technical Architect
@pbattisson
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize
or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the
forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any
projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding
strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or
technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for
our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate
of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with
completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability
to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our
limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential
factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year
and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are
available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and
may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are
currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Jennifer Wyher
Technical Architect at Mavens Consulting
@jenwyher
Paul Battisson
Technical Architect at Mavens Consulting
@pbattisson
Summer ’14 Force.com MVP
@forcedotcomcast
Mavens Consulting
• Preferred Life Sciences implementation
partner for salesforce.com and Veeva
• 60+ consultants located across North America
and Europe
• 12 Mavens in attendance at #Dreamforce14,
speaking in 7 different technical sessions
o
a
,
Baseline setting -
Who has worked on a machine
learning system before?
What is Machine
Learning?
Autonomous vehicles
Spam filtering
Search engines
Data analysis
o
a
,
“Field of study that gives computers the ability to
learn without being explicitly programmed”
- Arthur Samuel, 1959
Unsupervised
System determines
classification parameters
and groups
Supervised
You provide the
system with some
guidance
$200k
$120k $100k $180k $110k
$???
Why Apex?
• Governor limits make it hard to do long
running or big jobs with apex
• Showing the power of the platform
K-Means Clustering
• Account targeting
• Medical diagnosis aid
• Data segmentation
“given a group of m different
data points derive k clusters
of related items”
The Algorithm
• Initialize K centroids
• Assign each training example to it’s
“nearest” centroid
• Reset the centroid as the mean of all
assigned examples
• Repeat until the centroid is fixed
The Algorithm
• Initialize K centroids
• Assign each training example to it’s
“nearest” centroid
• Reset the centroid as the mean of all
assigned examples
• Repeat until the centroid is fixed
How we thought it would work
How it does work
Demo
The Need For Speed
• Chained Batches
– Batches creating batches
• Speedier loops
– Remove around 90% of CPUTime
– See http://goo.gl/mR5GZe
• JSON serialize/deserialize and attachments
– Quick and effective way of storing data
– Attachments have much larger limit (around 10x the amount of data)
• Running totals (stateful batch)
– Saves repeated loops
• Javascript Remoting for charting
– Loading so many attachments destroys heap size
– Use remoting to load attachments for display asynchronously
Future Ideas
• Recommendation Engines
– Content
– Products/services
• Neural Networks
– Lots of number processing
– Chaining will be key
• Real time sites recommendations
– Think Amazon recommendations
@jenwyher
@pbattisson
@mavens
https://github.com/pbattisson/DF14-Building-Machine-Learning-Systems-With-Apex

More Related Content

What's hot (20)

PDF
Advanced Apex Development - Asynchronous Processes
Salesforce Developers
 
PPTX
JavaScript Integration with Visualforce
Salesforce Developers
 
PDF
Introduction to Apex Triggers
Salesforce Developers
 
PDF
Winter 14 Release Developer Preview
Salesforce Developers
 
PPT
The Salesforce Einstein Product Team: Ask Us Anything!
Salesforce Developers
 
PPTX
Intro to Apex - Salesforce Force Friday Webinar
Abhinav Gupta
 
PDF
Developing Interactive Tables and Charts in Visualforce
Salesforce Developers
 
PPTX
Intro to Apex Testing - Dreamforce 2016
Laura Meerkatz
 
PPTX
Content Strategy Workshop
Salesforce Engineering
 
PDF
Visualforce Hack for Junction Objects
Ritesh Aswaney
 
PDF
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
Salesforce Developers
 
PDF
Javascript Security and Lightning Locker Service
Salesforce Developers
 
PDF
Introduction to Apex Triggers
Salesforce Developers
 
PDF
7 Habits of Highly Efficient Visualforce Pages
Salesforce Developers
 
PPTX
Build Better Communities with Lightning
Salesforce Developers
 
PDF
Salesforce Deployment: From Production Hacker to Agile Guru
Salesforce Developers
 
PPTX
Modeling and Querying Data and Relationships in Salesforce
Salesforce Developers
 
PDF
Einstein Analytics for Developers
Salesforce Developers
 
PDF
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
Salesforce Developers Japan
 
PPTX
Building Efficient Visualforce Pages
Salesforce Developers
 
Advanced Apex Development - Asynchronous Processes
Salesforce Developers
 
JavaScript Integration with Visualforce
Salesforce Developers
 
Introduction to Apex Triggers
Salesforce Developers
 
Winter 14 Release Developer Preview
Salesforce Developers
 
The Salesforce Einstein Product Team: Ask Us Anything!
Salesforce Developers
 
Intro to Apex - Salesforce Force Friday Webinar
Abhinav Gupta
 
Developing Interactive Tables and Charts in Visualforce
Salesforce Developers
 
Intro to Apex Testing - Dreamforce 2016
Laura Meerkatz
 
Content Strategy Workshop
Salesforce Engineering
 
Visualforce Hack for Junction Objects
Ritesh Aswaney
 
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
Salesforce Developers
 
Javascript Security and Lightning Locker Service
Salesforce Developers
 
Introduction to Apex Triggers
Salesforce Developers
 
7 Habits of Highly Efficient Visualforce Pages
Salesforce Developers
 
Build Better Communities with Lightning
Salesforce Developers
 
Salesforce Deployment: From Production Hacker to Agile Guru
Salesforce Developers
 
Modeling and Querying Data and Relationships in Salesforce
Salesforce Developers
 
Einstein Analytics for Developers
Salesforce Developers
 
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
Salesforce Developers Japan
 
Building Efficient Visualforce Pages
Salesforce Developers
 

Similar to Df14 Building Machine Learning Systems with Apex (20)

PPSX
Einstein prediction builder & Einstein language
Om Prakash
 
PDF
Building Smart Apps
Salesforce Developers
 
PDF
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Spark Summit
 
PDF
Using Apache Spark for Intelligent Services by Alexis Roos
Spark Summit
 
PPTX
Force.com Friday : Intro to Apex
Salesforce Developers
 
PDF
UX STRAT Europe 2018: Hervé Mischler, Salesforce
UX STRAT
 
PPTX
Elevate Madrid Essentials - Advance Track
CarolEnLaNube
 
PPTX
Detroit ELEVATE Track 1
Joshua Birk
 
PDF
Build AI-Powered Predictions with Einstein Prediction Builder
Salesforce Admins
 
PPTX
Salesforce Campus Tour - Declarative
James Ward
 
PPTX
CCT London 2013 Theatre Intro to Apex
Peter Chittum
 
PDF
Forcing Functions: Reconceiving Everything - Peter Coffee at AITP San Diego C...
Peter Coffee
 
PPTX
Salesforce1 Analytics API Hands-On Training
Salesforce Developers
 
PDF
Developing on the Salesforce Platform With Clicks, Not Code
Salesforce Developers
 
PDF
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...
Databricks
 
PPTX
Triggers, Workflow, and Flows
Salesforce.org
 
PDF
Introduction to Force.com
Salesforce Developers
 
PDF
Elevate workshop track1
Salesforce Developers
 
PPTX
Salesforce Campus Tour - Developer Intro
James Ward
 
PDF
Build Smarter Apps with Einstein Object Detection
Salesforce Developers
 
Einstein prediction builder & Einstein language
Om Prakash
 
Building Smart Apps
Salesforce Developers
 
Using Apache Spark for Intelligent Services: Keynote at Spark Summit East by ...
Spark Summit
 
Using Apache Spark for Intelligent Services by Alexis Roos
Spark Summit
 
Force.com Friday : Intro to Apex
Salesforce Developers
 
UX STRAT Europe 2018: Hervé Mischler, Salesforce
UX STRAT
 
Elevate Madrid Essentials - Advance Track
CarolEnLaNube
 
Detroit ELEVATE Track 1
Joshua Birk
 
Build AI-Powered Predictions with Einstein Prediction Builder
Salesforce Admins
 
Salesforce Campus Tour - Declarative
James Ward
 
CCT London 2013 Theatre Intro to Apex
Peter Chittum
 
Forcing Functions: Reconceiving Everything - Peter Coffee at AITP San Diego C...
Peter Coffee
 
Salesforce1 Analytics API Hands-On Training
Salesforce Developers
 
Developing on the Salesforce Platform With Clicks, Not Code
Salesforce Developers
 
Using AI for Providing Insights and Recommendations on Activity Data Alexis R...
Databricks
 
Triggers, Workflow, and Flows
Salesforce.org
 
Introduction to Force.com
Salesforce Developers
 
Elevate workshop track1
Salesforce Developers
 
Salesforce Campus Tour - Developer Intro
James Ward
 
Build Smarter Apps with Einstein Object Detection
Salesforce Developers
 
Ad

Recently uploaded (20)

PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Python basic programing language for automation
DanialHabibi2
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Ad

Df14 Building Machine Learning Systems with Apex

  • 1. Building Machine Learning Systems in Apex Jen Wyher Technical Architect @jenwyher Paul Battisson Technical Architect @pbattisson
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Jennifer Wyher Technical Architect at Mavens Consulting @jenwyher
  • 4. Paul Battisson Technical Architect at Mavens Consulting @pbattisson Summer ’14 Force.com MVP @forcedotcomcast
  • 5. Mavens Consulting • Preferred Life Sciences implementation partner for salesforce.com and Veeva • 60+ consultants located across North America and Europe • 12 Mavens in attendance at #Dreamforce14, speaking in 7 different technical sessions
  • 6. o a , Baseline setting - Who has worked on a machine learning system before?
  • 7. What is Machine Learning? Autonomous vehicles Spam filtering Search engines Data analysis
  • 8. o a , “Field of study that gives computers the ability to learn without being explicitly programmed” - Arthur Samuel, 1959
  • 10. Supervised You provide the system with some guidance $200k $120k $100k $180k $110k $???
  • 11. Why Apex? • Governor limits make it hard to do long running or big jobs with apex • Showing the power of the platform
  • 12. K-Means Clustering • Account targeting • Medical diagnosis aid • Data segmentation “given a group of m different data points derive k clusters of related items”
  • 13. The Algorithm • Initialize K centroids • Assign each training example to it’s “nearest” centroid • Reset the centroid as the mean of all assigned examples • Repeat until the centroid is fixed
  • 14. The Algorithm • Initialize K centroids • Assign each training example to it’s “nearest” centroid • Reset the centroid as the mean of all assigned examples • Repeat until the centroid is fixed
  • 15. How we thought it would work
  • 16. How it does work
  • 17. Demo
  • 18. The Need For Speed • Chained Batches – Batches creating batches • Speedier loops – Remove around 90% of CPUTime – See http://goo.gl/mR5GZe • JSON serialize/deserialize and attachments – Quick and effective way of storing data – Attachments have much larger limit (around 10x the amount of data) • Running totals (stateful batch) – Saves repeated loops • Javascript Remoting for charting – Loading so many attachments destroys heap size – Use remoting to load attachments for display asynchronously
  • 19. Future Ideas • Recommendation Engines – Content – Products/services • Neural Networks – Lots of number processing – Chaining will be key • Real time sites recommendations – Think Amazon recommendations

Editor's Notes

  • #2: Paul - 30 secs
  • #3: Paul
  • #4: Paul
  • #5: Paul
  • #6: JOE and if you’re not familiar with mavens we are the preferred healthcare and life sciences partner for salesforce.com and veeva we have about 60 consultants located across North America and Europe and we have 12 mavens in attendance at #dreamforce14, speaking in 7 different technical sessions and we’re feeling a little extra pride right now, earlier today, we won the salesforce partner innovation award for marketing, so I figured id toot our horn a bit
  • #7: Paul - EOS = 2 mins
  • #8: Paul - EOS =3
  • #9: Paul - EOS = 4
  • #10: Paul - EOS = 6
  • #11: Paul - EOS - 8
  • #13: Jen - EOS = 12 Simple but still lots of iterations and calculations K-Mean Clustering Algorithm. How does the algorithm work? Feed it a large amount of dataset (eg: your sales data). The end result of the calculations, the data points are a pre-defined # of clustering (k # of clustering) groupings of the provided data set. Identifying data points with the most similarities. Account Target Customized marketing plan. Cardiology vs a neurologist Medical Diagnosis Aid Could have a tumor based on profile, probability of having certain diseases. Data Segmentation Cluster into groups to analyze
  • #14: Jen - EOS = 14
  • #15: Jen - EOS = 14 Diagram shows you 2-dimensional, but imagine that you can do this analysis for 5, 10, even 100 attributes to the observation.
  • #16: Jen - EOS = 18 Saving too much data Our calculations were running long .. And actually our goal at this time was to be able to analyze on 11 datapoints.
  • #17: Chained Batches, Winter ‘13. Start a Batch Apex job from within another Batch Apex job. Purist, and use matrix operations.
  • #18: Jen - Demo - EOD = 24
  • #21: Paul - EOS = 25