SlideShare uma empresa Scribd logo
1 de 19
F# IN YOUR PIPE
COPENHAGEN R
Phil Trelford
@ptrelford
F#UNCTIONAL LONDONERS
Founded Feb 2010
800 Members
Meet every 2 weeks
Key topics:
 Functional Programming
 Machine Learning
 Apps and Games
http://meetup.com/fsharplondon
CASE STUDIES Phillip Trelford, @ptrelford
Copenhagen R, 2014
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
TESTIMONIALS – F# IN
MACHINE LEARNING
Phillip Trelford, @ptrelford
Copenhagen R, 2014
FSHARP.ORG/TESTIMONIALS -
MICROSOFT
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
LIVE DEMOS Phil Trelford, @ptrelford
Copenhagen R, 2014
PIPE IT
load(transform(extract(data)))
f3( f2( f1( x ) ) )
let (|>) x f = f x
x |> f1 |> f2 |> f3
data |> extract |> transform |> load
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))
TYPE PROVIDERS
JSON
XML
CSV
Excel
SQL
R
MATLAB
Hadoop
…
CSV TYPE PROVIDER
R – TYPE PROVIDER
FSLAB
Data
Charting
Deedle
Math.Net
R Provider
RESOURCES Phil Trelford, @ptrelford
Copenhagen R, 2014
TRY IT BEFORE YOU BUY IT
BUY THE BOOK
JOIN THE COMMUNITY
F# Foundation
http://fsharp.org
Copenhagen F# Meetup
http://www.meetup.com/MoedegruppeFunktionelleKoebenhavnere/
Progressive F# Tutorials London
https://skillsmatter.com/conferences/1926-progressive-f-tutorials-
2014

Mais conteúdo relacionado

Destaque

Keyboard warriors #1 copenhagen performance
Keyboard warriors #1 copenhagen   performanceKeyboard warriors #1 copenhagen   performance
Keyboard warriors #1 copenhagen performance
Phillip Trelford
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
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 Trelford
 
All your types are belong to us!
All your types are belong to us!All your types are belong to us!
All your types are belong to us!
Phillip Trelford
 

Destaque (20)

F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015
 
F# for Trading - QuantLabs 2014
F# for Trading -  QuantLabs 2014F# for Trading -  QuantLabs 2014
F# for Trading - QuantLabs 2014
 
Keyboard warriors #1 copenhagen performance
Keyboard warriors #1 copenhagen   performanceKeyboard warriors #1 copenhagen   performance
Keyboard warriors #1 copenhagen performance
 
Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015
 
F# eXchange Keynote 2016
F# eXchange Keynote 2016F# eXchange Keynote 2016
F# eXchange Keynote 2016
 
Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015
 
FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015
 
Building a web application with ontinuation monads
Building a web application with ontinuation monadsBuilding a web application with ontinuation monads
Building a web application with ontinuation monads
 
FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
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
 
Creating own language made easy
Creating own language made easyCreating own language made easy
Creating own language made easy
 
Write Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 HoursWrite Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 Hours
 
FParsec Hands On - F#unctional Londoners 2014
FParsec Hands On -  F#unctional Londoners 2014FParsec Hands On -  F#unctional Londoners 2014
FParsec Hands On - F#unctional Londoners 2014
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
 
All your types are belong to us!
All your types are belong to us!All your types are belong to us!
All your types are belong to us!
 
Real World F# - SDD 2015
Real World F# -  SDD 2015Real World F# -  SDD 2015
Real World F# - SDD 2015
 
F# for C# devs - SDD 2015
F# for C# devs - SDD 2015F# for C# devs - SDD 2015
F# for C# devs - SDD 2015
 
Ready, steady, cross platform games - ProgNet 2015
Ready, steady, cross platform games - ProgNet 2015Ready, steady, cross platform games - ProgNet 2015
Ready, steady, cross platform games - ProgNet 2015
 
Building a game in a day
Building a game in a dayBuilding a game in a day
Building a game in a day
 
Mobile F#un
Mobile F#unMobile F#un
Mobile F#un
 

Semelhante a F# in your pipe

Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Chris Fregly
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
Chris Fregly
 
[計一] Basic r programming final0918
[計一] Basic r programming   final0918[計一] Basic r programming   final0918
[計一] Basic r programming final0918
Yen_CY
 
[計一] Basic r programming final0918
[計一] Basic r programming   final0918[計一] Basic r programming   final0918
[計一] Basic r programming final0918
Chia-Yi Yen
 
F# for C# devs - Leeds Sharp 2015
F# for C# devs -  Leeds Sharp 2015F# for C# devs -  Leeds Sharp 2015
F# for C# devs - Leeds Sharp 2015
Phillip Trelford
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
chiportal
 
F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015
Phillip Trelford
 

Semelhante a F# in your pipe (20)

Tensorflow Ecosystem
Tensorflow EcosystemTensorflow Ecosystem
Tensorflow Ecosystem
 
FSharp in the enterprise
FSharp in the enterpriseFSharp in the enterprise
FSharp in the enterprise
 
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
Certification Study Group -Professional ML Engineer Session 2 (GCP-TensorFlow...
 
Terraform training 🎒 - Basic
Terraform training 🎒 - BasicTerraform training 🎒 - Basic
Terraform training 🎒 - Basic
 
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
Hands-on Learning with KubeFlow + Keras/TensorFlow 2.0 + TF Extended (TFX) + ...
 
Productive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi CoprocessorsProductive OpenCL with Intel Xeon Phi Coprocessors
Productive OpenCL with Intel Xeon Phi Coprocessors
 
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
[計一] Basic r programming final0918
[計一] Basic r programming   final0918[計一] Basic r programming   final0918
[計一] Basic r programming final0918
 
[計一] Basic r programming final0918
[計一] Basic r programming   final0918[計一] Basic r programming   final0918
[計一] Basic r programming final0918
 
F# for C# devs - Leeds Sharp 2015
F# for C# devs -  Leeds Sharp 2015F# for C# devs -  Leeds Sharp 2015
F# for C# devs - Leeds Sharp 2015
 
mlp10-sem2.pdf
mlp10-sem2.pdfmlp10-sem2.pdf
mlp10-sem2.pdf
 
biopython, doctest and makefiles
biopython, doctest and makefilesbiopython, doctest and makefiles
biopython, doctest and makefiles
 
running Tensorflow in Production
running Tensorflow in Productionrunning Tensorflow in Production
running Tensorflow in Production
 
Afl - 4fun and pr0fit
Afl - 4fun and pr0fitAfl - 4fun and pr0fit
Afl - 4fun and pr0fit
 
Track A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBMTrack A-Compilation guiding and adjusting - IBM
Track A-Compilation guiding and adjusting - IBM
 
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
 
F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
 
DPI2012
DPI2012DPI2012
DPI2012
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

F# in your pipe

  • 1. F# IN YOUR PIPE COPENHAGEN R Phil Trelford @ptrelford
  • 2. F#UNCTIONAL LONDONERS Founded Feb 2010 800 Members Meet every 2 weeks Key topics:  Functional Programming  Machine Learning  Apps and Games http://meetup.com/fsharplondon
  • 3. CASE STUDIES Phillip Trelford, @ptrelford Copenhagen R, 2014
  • 4. 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
  • 5. 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
  • 6. TESTIMONIALS – F# IN MACHINE LEARNING Phillip Trelford, @ptrelford Copenhagen R, 2014
  • 7. FSHARP.ORG/TESTIMONIALS - MICROSOFT 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
  • 8. 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
  • 9. LIVE DEMOS Phil Trelford, @ptrelford Copenhagen R, 2014
  • 10. PIPE IT load(transform(extract(data))) f3( f2( f1( x ) ) ) let (|>) x f = f x x |> f1 |> f2 |> f3 data |> extract |> transform |> load
  • 11. 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))
  • 14. R – TYPE PROVIDER
  • 16. RESOURCES Phil Trelford, @ptrelford Copenhagen R, 2014
  • 17. TRY IT BEFORE YOU BUY IT
  • 19. JOIN THE COMMUNITY F# Foundation http://fsharp.org Copenhagen F# Meetup http://www.meetup.com/MoedegruppeFunktionelleKoebenhavnere/ Progressive F# Tutorials London https://skillsmatter.com/conferences/1926-progressive-f-tutorials- 2014

Notas do Editor

  1. http://fsharp.github.io/FSharp.Data/library/CsvProvider.html http://clear-lines.com/blog/post/Random-Forest-classification-in-F-first-cut.aspx