All your types are belong to us!

ALL YOUR TYPES ARE
BELONG TO US!
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
F#UNCTIONAL LONDONERS
Meetup

Topics

• 600 members

• Finance

• 50 meetup

• Machine Learning

• Meets every 2 weeks

• Big Data

• Talks & Hands On

• Gaming
FSHARP.ORG/GROUPS
F# TESTIMONIALS – MACHINE
LEARNING
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
FSHARP.ORG/TESTIMONIALS
For a machine learning scientist, speed of experimentation is the critical factor to optimize.
Compiling is fast but loading large amounts of data in memory takes a long time.
With F#’s REPL, you only need to load the data once

and you can then code and explore in the interactive environment.
Unlike C# and C++, F# was designed for this mode of interaction.
- Patrice Simard, Microsoft
FSHARP.ORG/TESTIMONIALS - AMYRIS
BIOTECH
F# has been phenomenally useful.
I would be writing a lot of this in Python otherwise
and F# is more robust, 20x - 100x faster to run

and for anything but the most trivial programs,
faster to develop.
- Darren Platt, Amyris Biotechnology
CASE STUDIES
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
F# TOOLS FOR HALO 3
Questions
• Controllable player skill distribution (slow down!)
• Controllable skills distributions (re-ordering)

Simulations
• Large scale simulation of 8,000,000,000 matches
• Distributed computation – 15 machines for 2wks
Tools

• Result viewer (Logged results: 52GB of data)
• Real-time simulator of partial update
ADCENTER
Weeks of data in training:
• 7,000,000,000 impressions
2 weeks of CPU time during sessions

• 2 wks x 7 days x 86,400 sec/day
Learning algorithm speed requirement:
• 5,787 impression updates /sec
• 172.8 µs per impression update
LIVE DEMOS
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
TYPE PROVIDERS: JSON

open FSharp.Data

type Simple = JsonProvider<“sample.js”>
let simple = Simple.Parse(""" { "name":"Tomas", "age":4 } """)
simple.Age
CSV TYPE PROVIDER
SPLIT DATA SET (FROM ML IN ACTION)
Python
def splitDataSet(dataSet, axis, value):
retDataSet = []
for featVec in dataSet:
if featVec[axis] == value:

reducedFeatVec = featVec[:axis]
reducedFeatVec.extend(featVec[axis+1:])
retDataSet.append(reducedFeatVec)
return retDataSet

F#
let splitDataSet(dataSet, axis, value) =
[|for featVec in dataSet do
if featVec.[axis] = value then
yield featVec |> Array.removeAt axis|]
K-MEANS CLUSTERING ALGORITHM
(* K-Means Algorithm *)
/// Group all the vectors by the nearest center.
let classify centroids vectors =
vectors |> Array.groupBy (fun v -> centroids |> Array.minBy (distance v))
/// Repeatedly classify the vectors, starting with the seed centroids
let computeCentroids seed vectors =
seed |> Seq.iterate (fun centers -> classify centers vectors

|> Array.map (snd >> average))
R – TYPE PROVIDER
WORLD BANK DATA
RESOURCES
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
TYPE PROVIDERS
• JSON
• XML
• CSV

• Excel
• SQL
• R
• MATLAB

• Hadoop
• ...
TRYFSHARP.ORG
BUY THE BOOK
GET THE T-SHIRT
MACHINE LEARNING JOB TRENDS

• Source indeed.co.uk
QUESTIONS
PHILLIP TRELFORD, @PTRELFORD
DDD DUNDEE 2013, #DUNDDD
1 of 23

Recommended

Making Magic with F# Type Providers by
Making Magic with F# Type ProvidersMaking Magic with F# Type Providers
Making Magic with F# Type Providersdsyme
4.4K views65 slides
How To Run Mapreduce Jobs In Python by
How To Run Mapreduce Jobs In PythonHow To Run Mapreduce Jobs In Python
How To Run Mapreduce Jobs In PythonYi Wang
1.3K views10 slides
BeautifulSoup / selenium Deep dive by
BeautifulSoup / selenium Deep diveBeautifulSoup / selenium Deep dive
BeautifulSoup / selenium Deep diveNaoto MATSUMOTO
212 views3 slides
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation) by
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)Kory Becker
578 views5 slides
Self Programming Artificial Intelligence by
Self Programming Artificial IntelligenceSelf Programming Artificial Intelligence
Self Programming Artificial IntelligenceKory Becker
1.2K views22 slides
IBM Watson Concept Insights by
IBM Watson Concept InsightsIBM Watson Concept Insights
IBM Watson Concept InsightsKory Becker
1.6K views15 slides

More Related Content

Viewers also liked

24 Hours Later - NCrafts Paris 2015 by
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015Phillip Trelford
1.5K views17 slides
Machine learning from disaster - GL.Net 2015 by
Machine learning from disaster  - GL.Net 2015Machine learning from disaster  - GL.Net 2015
Machine learning from disaster - GL.Net 2015Phillip Trelford
2.2K views23 slides
24 hours later - FSharp Gotham 2015 by
24 hours later - FSharp Gotham  201524 hours later - FSharp Gotham  2015
24 hours later - FSharp Gotham 2015Phillip Trelford
984 views19 slides
Keyboard warriors #1 copenhagen performance by
Keyboard warriors #1 copenhagen   performanceKeyboard warriors #1 copenhagen   performance
Keyboard warriors #1 copenhagen performancePhillip Trelford
701 views4 slides
Beyond lists - Copenhagen 2015 by
Beyond lists - Copenhagen 2015Beyond lists - Copenhagen 2015
Beyond lists - Copenhagen 2015Phillip Trelford
1.4K views36 slides
F# in Finance Tour by
F# in Finance TourF# in Finance Tour
F# in Finance TourPhillip Trelford
2.5K views22 slides

Viewers also liked(20)

24 Hours Later - NCrafts Paris 2015 by Phillip Trelford
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015
Phillip Trelford1.5K views
Machine learning from disaster - GL.Net 2015 by Phillip Trelford
Machine learning from disaster  - GL.Net 2015Machine learning from disaster  - GL.Net 2015
Machine learning from disaster - GL.Net 2015
Phillip Trelford2.2K views
Keyboard warriors #1 copenhagen performance by Phillip Trelford
Keyboard warriors #1 copenhagen   performanceKeyboard warriors #1 copenhagen   performance
Keyboard warriors #1 copenhagen performance
Phillip Trelford701 views
Build a compiler in 2hrs - NCrafts Paris 2015 by Phillip Trelford
Build a compiler in 2hrs -  NCrafts Paris 2015Build a compiler in 2hrs -  NCrafts Paris 2015
Build a compiler in 2hrs - NCrafts Paris 2015
Phillip Trelford2.3K views
Building a web application with ontinuation monads by Seitaro Yuuki
Building a web application with ontinuation monadsBuilding a web application with ontinuation monads
Building a web application with ontinuation monads
Seitaro Yuuki295 views
Building cross platform games with Xamarin - Birmingham 2015 by Phillip Trelford
Building cross platform games with Xamarin - Birmingham 2015Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015
Phillip Trelford841 views
FSharp eye for the Haskell guy - London 2015 by Phillip Trelford
FSharp eye for the Haskell guy - London 2015FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015
Phillip Trelford1.7K views
Generative Art - Functional Vilnius 2015 by Phillip Trelford
Generative Art - Functional Vilnius 2015Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015
Phillip Trelford2.1K views
FSharp On The Desktop - Birmingham FP 2015 by Phillip Trelford
FSharp On The Desktop - Birmingham FP 2015FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015
Phillip Trelford1.7K views
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014 by Phillip Trelford
F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
Phillip Trelford1K views
Write Your Own Compiler in 24 Hours by Phillip Trelford
Write Your Own Compiler in 24 HoursWrite Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 Hours
Phillip Trelford2.4K views

Similar to All your types are belong to us!

DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify by
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify Dataconomy Media
254 views59 slides
The Data Janitor Returns | Daniel Molnar | DN18 by
The Data Janitor Returns | Daniel Molnar | DN18The Data Janitor Returns | Daniel Molnar | DN18
The Data Janitor Returns | Daniel Molnar | DN18DataconomyGmbH
46 views59 slides
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin by
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin Databricks
699 views41 slides
DRUG - RDSTK Talk by
DRUG - RDSTK TalkDRUG - RDSTK Talk
DRUG - RDSTK Talkrtelmore
3.4K views24 slides
Pig latin by
Pig latinPig latin
Pig latinBita Kazemi
595 views21 slides
Extensions on PostgreSQL by
Extensions on PostgreSQLExtensions on PostgreSQL
Extensions on PostgreSQLAlpaca
2.4K views12 slides

Similar to All your types are belong to us!(20)

DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify by Dataconomy Media
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify
Dataconomy Media254 views
The Data Janitor Returns | Daniel Molnar | DN18 by DataconomyGmbH
The Data Janitor Returns | Daniel Molnar | DN18The Data Janitor Returns | Daniel Molnar | DN18
The Data Janitor Returns | Daniel Molnar | DN18
DataconomyGmbH46 views
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin by Databricks
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin
The Key to Machine Learning is Prepping the Right Data with Jean Georges Perrin
Databricks699 views
DRUG - RDSTK Talk by rtelmore
DRUG - RDSTK TalkDRUG - RDSTK Talk
DRUG - RDSTK Talk
rtelmore3.4K views
Extensions on PostgreSQL by Alpaca
Extensions on PostgreSQLExtensions on PostgreSQL
Extensions on PostgreSQL
Alpaca2.4K views
TF Dev Summit 2019 by Ray Hilton
TF Dev Summit 2019TF Dev Summit 2019
TF Dev Summit 2019
Ray Hilton302 views
Improve your SQL workload with observability by OVHcloud
Improve your SQL workload with observabilityImprove your SQL workload with observability
Improve your SQL workload with observability
OVHcloud828 views
Accelerating Data Processing in Spark SQL with Pandas UDFs by Databricks
Accelerating Data Processing in Spark SQL with Pandas UDFsAccelerating Data Processing in Spark SQL with Pandas UDFs
Accelerating Data Processing in Spark SQL with Pandas UDFs
Databricks529 views
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017 by StampedeCon
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
Getting Started with Keras and TensorFlow - StampedeCon AI Summit 2017
StampedeCon1.4K views
Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl... by Lucidworks
Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl...Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl...
Learning to Rank in Solr: Presented by Michael Nilsson & Diego Ceccarelli, Bl...
Lucidworks29.9K views
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013 by Intel Software Brasil
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Computação Paralela: Benefícios e Desafios - Intel Software Conference 2013
Anirudh Koul. 30 Golden Rules of Deep Learning Performance by Lviv Startup Club
Anirudh Koul. 30 Golden Rules of Deep Learning PerformanceAnirudh Koul. 30 Golden Rules of Deep Learning Performance
Anirudh Koul. 30 Golden Rules of Deep Learning Performance
Lviv Startup Club164 views
RedisSearch / CRDT: Kyle Davis, Meir Shpilraien by Redis Labs
RedisSearch / CRDT: Kyle Davis, Meir ShpilraienRedisSearch / CRDT: Kyle Davis, Meir Shpilraien
RedisSearch / CRDT: Kyle Davis, Meir Shpilraien
Redis Labs335 views
Reflected intelligence evolving self-learning data systems by Trey Grainger
Reflected intelligence  evolving self-learning data systemsReflected intelligence  evolving self-learning data systems
Reflected intelligence evolving self-learning data systems
Trey Grainger6.5K views
Building Deep Learning Workflows with DL4J by Josh Patterson
Building Deep Learning Workflows with DL4JBuilding Deep Learning Workflows with DL4J
Building Deep Learning Workflows with DL4J
Josh Patterson3.3K views

More from Phillip Trelford

How to be a rock star developer by
How to be a rock star developerHow to be a rock star developer
How to be a rock star developerPhillip Trelford
880 views33 slides
Mobile F#un by
Mobile F#unMobile F#un
Mobile F#unPhillip Trelford
1.3K views36 slides
Ready, steady, cross platform games - ProgNet 2015 by
Ready, steady, cross platform games - ProgNet 2015Ready, steady, cross platform games - ProgNet 2015
Ready, steady, cross platform games - ProgNet 2015Phillip Trelford
7.2K views29 slides
F# for C# devs - NDC Oslo 2015 by
F# for C# devs - NDC Oslo 2015F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015Phillip Trelford
975 views37 slides
F# for C# devs - Leeds Sharp 2015 by
F# for C# devs -  Leeds Sharp 2015F# for C# devs -  Leeds Sharp 2015
F# for C# devs - Leeds Sharp 2015Phillip Trelford
722 views36 slides
Real World F# - SDD 2015 by
Real World F# -  SDD 2015Real World F# -  SDD 2015
Real World F# - SDD 2015Phillip Trelford
1K views30 slides

More from Phillip Trelford(11)

Recently uploaded

Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
56 views26 slides
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...ShapeBlue
46 views29 slides
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...ShapeBlue
88 views20 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
145 views53 slides
Business Analyst Series 2023 - Week 3 Session 5 by
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
369 views20 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
58 views21 slides

Recently uploaded(20)

Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely56 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue46 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue88 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue145 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10369 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc77 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue96 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue50 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn28 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays40 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue131 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue77 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue96 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue91 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue83 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray1080 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson133 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue111 views

All your types are belong to us!

  • 1. ALL YOUR TYPES ARE BELONG TO US! PHILLIP TRELFORD, @PTRELFORD DDD DUNDEE 2013, #DUNDDD
  • 2. F#UNCTIONAL LONDONERS Meetup Topics • 600 members • Finance • 50 meetup • Machine Learning • Meets every 2 weeks • Big Data • Talks & Hands On • Gaming
  • 4. F# TESTIMONIALS – MACHINE LEARNING PHILLIP TRELFORD, @PTRELFORD DDD DUNDEE 2013, #DUNDDD
  • 5. FSHARP.ORG/TESTIMONIALS For a machine learning scientist, speed of experimentation is the critical factor to optimize. Compiling is fast but loading large amounts of data in memory takes a long time. With F#’s REPL, you only need to load the data once and you can then code and explore in the interactive environment. Unlike C# and C++, F# was designed for this mode of interaction. - Patrice Simard, Microsoft
  • 6. FSHARP.ORG/TESTIMONIALS - AMYRIS BIOTECH F# has been phenomenally useful. I would be writing a lot of this in Python otherwise and F# is more robust, 20x - 100x faster to run and for anything but the most trivial programs, faster to develop. - Darren Platt, Amyris Biotechnology
  • 7. CASE STUDIES PHILLIP TRELFORD, @PTRELFORD DDD DUNDEE 2013, #DUNDDD
  • 8. F# TOOLS FOR HALO 3 Questions • Controllable player skill distribution (slow down!) • Controllable skills distributions (re-ordering) Simulations • Large scale simulation of 8,000,000,000 matches • Distributed computation – 15 machines for 2wks Tools • Result viewer (Logged results: 52GB of data) • Real-time simulator of partial update
  • 9. ADCENTER Weeks of data in training: • 7,000,000,000 impressions 2 weeks of CPU time during sessions • 2 wks x 7 days x 86,400 sec/day Learning algorithm speed requirement: • 5,787 impression updates /sec • 172.8 µs per impression update
  • 10. LIVE DEMOS PHILLIP TRELFORD, @PTRELFORD DDD DUNDEE 2013, #DUNDDD
  • 11. TYPE PROVIDERS: JSON open FSharp.Data type Simple = JsonProvider<“sample.js”> let simple = Simple.Parse(""" { "name":"Tomas", "age":4 } """) simple.Age
  • 13. SPLIT DATA SET (FROM ML IN ACTION) Python def splitDataSet(dataSet, axis, value): retDataSet = [] for featVec in dataSet: if featVec[axis] == value: reducedFeatVec = featVec[:axis] reducedFeatVec.extend(featVec[axis+1:]) retDataSet.append(reducedFeatVec) return retDataSet F# let splitDataSet(dataSet, axis, value) = [|for featVec in dataSet do if featVec.[axis] = value then yield featVec |> Array.removeAt axis|]
  • 14. K-MEANS CLUSTERING ALGORITHM (* K-Means Algorithm *) /// Group all the vectors by the nearest center. let classify centroids vectors = vectors |> Array.groupBy (fun v -> centroids |> Array.minBy (distance v)) /// Repeatedly classify the vectors, starting with the seed centroids let computeCentroids seed vectors = seed |> Seq.iterate (fun centers -> classify centers vectors |> Array.map (snd >> average))
  • 15. R – TYPE PROVIDER
  • 18. TYPE PROVIDERS • JSON • XML • CSV • Excel • SQL • R • MATLAB • Hadoop • ...
  • 22. MACHINE LEARNING JOB TRENDS • Source indeed.co.uk

Editor's Notes

  1. Fsharp.org map
  2. http://fsharp.github.io/FSharp.Data/library/CsvProvider.htmlhttp://clear-lines.com/blog/post/Random-Forest-classification-in-F-first-cut.aspx
  3. http://www.indeed.com/jobanalytics/jobtrends?q=machine+learning&amp;l=