SlideShare une entreprise Scribd logo
1  sur  20
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

Contenu connexe

Tendances

7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages
Salesforce Developers
 

Tendances (20)

Advanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous ProcessesAdvanced Apex Development - Asynchronous Processes
Advanced Apex Development - Asynchronous Processes
 
JavaScript Integration with Visualforce
JavaScript Integration with VisualforceJavaScript Integration with Visualforce
JavaScript Integration with Visualforce
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Winter 14 Release Developer Preview
Winter 14 Release Developer PreviewWinter 14 Release Developer Preview
Winter 14 Release Developer Preview
 
The Salesforce Einstein Product Team: Ask Us Anything!
The Salesforce Einstein Product Team: Ask Us Anything!The Salesforce Einstein Product Team: Ask Us Anything!
The Salesforce Einstein Product Team: Ask Us Anything!
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
 
Developing Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in VisualforceDeveloping Interactive Tables and Charts in Visualforce
Developing Interactive Tables and Charts in Visualforce
 
Intro to Apex Testing - Dreamforce 2016
Intro to Apex Testing - Dreamforce 2016Intro to Apex Testing - Dreamforce 2016
Intro to Apex Testing - Dreamforce 2016
 
Content Strategy Workshop
Content Strategy WorkshopContent Strategy Workshop
Content Strategy Workshop
 
Visualforce Hack for Junction Objects
Visualforce Hack for Junction ObjectsVisualforce Hack for Junction Objects
Visualforce Hack for Junction Objects
 
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJSNgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
 
Javascript Security and Lightning Locker Service
Javascript Security and Lightning Locker ServiceJavascript Security and Lightning Locker Service
Javascript Security and Lightning Locker Service
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages7 Habits of Highly Efficient Visualforce Pages
7 Habits of Highly Efficient Visualforce Pages
 
Build Better Communities with Lightning
Build Better Communities with LightningBuild Better Communities with Lightning
Build Better Communities with Lightning
 
Salesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile GuruSalesforce Deployment: From Production Hacker to Agile Guru
Salesforce Deployment: From Production Hacker to Agile Guru
 
Modeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in SalesforceModeling and Querying Data and Relationships in Salesforce
Modeling and Querying Data and Relationships in Salesforce
 
Einstein Analytics for Developers
Einstein Analytics for DevelopersEinstein Analytics for Developers
Einstein Analytics for Developers
 
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
 
Building Efficient Visualforce Pages
Building Efficient Visualforce PagesBuilding Efficient Visualforce Pages
Building Efficient Visualforce Pages
 

Similaire à Df14 Building Machine Learning Systems with Apex

Similaire à Df14 Building Machine Learning Systems with Apex (20)

Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14
 
Introduction to Force.com
Introduction to Force.comIntroduction to Force.com
Introduction to Force.com
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Salesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation SummitSalesforce at Continuous Delivery Foundation Summit
Salesforce at Continuous Delivery Foundation Summit
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
How to Optimize Your AppExchange Listing
How to Optimize Your AppExchange ListingHow to Optimize Your AppExchange Listing
How to Optimize Your AppExchange Listing
 
Elevate workshop track1
Elevate workshop track1Elevate workshop track1
Elevate workshop track1
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
 
Enhancing Your Lightning Apps with Einstein Analytics
Enhancing Your Lightning Apps with Einstein AnalyticsEnhancing Your Lightning Apps with Einstein Analytics
Enhancing Your Lightning Apps with Einstein Analytics
 
Blue Clover Devices: The IoT ODM
Blue Clover Devices:  The IoT ODMBlue Clover Devices:  The IoT ODM
Blue Clover Devices: The IoT ODM
 
Squash Bugs with the Apex Debugger (TDX'17)
Squash Bugs with the Apex Debugger (TDX'17)Squash Bugs with the Apex Debugger (TDX'17)
Squash Bugs with the Apex Debugger (TDX'17)
 
Batch Jobs: Beyond the Basics
Batch Jobs: Beyond the BasicsBatch Jobs: Beyond the Basics
Batch Jobs: Beyond the Basics
 
Bulkify Your Org
Bulkify Your OrgBulkify Your Org
Bulkify Your Org
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
 
Release Management: Managing Your Internal Releases
Release Management: Managing Your Internal ReleasesRelease Management: Managing Your Internal Releases
Release Management: Managing Your Internal Releases
 
S1 Tour Paris Developpeurs
S1 Tour Paris DeveloppeursS1 Tour Paris Developpeurs
S1 Tour Paris Developpeurs
 
Apex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentApex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com Development
 
Partition Your (Apex) Trigger Logic Using Metadata
Partition Your  (Apex) Trigger Logic Using MetadataPartition Your  (Apex) Trigger Logic Using Metadata
Partition Your (Apex) Trigger Logic Using Metadata
 
Scaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsScaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of Events
 

Dernier

+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@
 
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
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+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...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
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
 
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 ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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

Notes de l'éditeur

  1. Paul - 30 secs
  2. Paul
  3. Paul
  4. Paul
  5. 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
  6. Paul - EOS = 2 mins
  7. Paul - EOS =3
  8. Paul - EOS = 4
  9. Paul - EOS = 6
  10. Paul - EOS - 8
  11. 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
  12. Jen - EOS = 14
  13. 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.
  14. 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.
  15. Chained Batches, Winter ‘13. Start a Batch Apex job from within another Batch Apex job. Purist, and use matrix operations.
  16. Jen - Demo - EOD = 24
  17. Paul - EOS = 25