Machine Learning on.NET F# FTW!. A few words about me  Mathias Brandewinder  Background: economics, operations research .NET developer.

Slides:



Advertisements
Similar presentations
Pseudo-Relevance Feedback For Multimedia Retrieval By Rong Yan, Alexander G. and Rong Jin Mwangi S. Kariuki
Advertisements

Machine Learning on Spark
CS525: Special Topics in DBs Large-Scale Data Management
Albert Gatt Corpora and Statistical Methods Lecture 13.
A new Machine Learning algorithm for Neoposy: coining new Parts of Speech Eric Atwell Computer Vision and Language group School of Computing University.
CPSC 502, Lecture 15Slide 1 Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 15 Nov, 1, 2011 Slide credit: C. Conati, S.
Search Engines Information Retrieval in Practice All slides ©Addison Wesley, 2008.
Indian Statistical Institute Kolkata
Classification Dr Eamonn Keogh Computer Science & Engineering Department University of California - Riverside Riverside,CA Who.
Machine Learning (Extended) Dr. Ata Kaban
Three kinds of learning
ML ALGORITHMS. Algorithm Types Classification (supervised) Given -> A set of classified examples “instances” Produce -> A way of classifying new examples.
Introduction to machine learning
Machine Learning Usman Roshan Dept. of Computer Science NJIT.
CS Machine Learning. What is Machine Learning? Adapt to / learn from data  To optimize a performance function Can be used to:  Extract knowledge.
More Machine Learning Linear Regression Squared Error L1 and L2 Regularization Gradient Descent.
B.Ramamurthy. Data Analytics (Data Science) EDA Data Intuition/ understand ing Big-data analytics StatsAlgs Discoveries / intelligence Statistical Inference.
Machine Learning Queens College Lecture 1: Introduction.
Unsupervised Learning. CS583, Bing Liu, UIC 2 Supervised learning vs. unsupervised learning Supervised learning: discover patterns in the data that relate.
Lecture 2: Introduction to Machine Learning
Machine Learning CUNY Graduate Center Lecture 1: Introduction.
Data mining and machine learning A brief introduction.
Machine Learning1 Machine Learning: Summary Greg Grudic CSCI-4830.
Introduction to machine learning and data mining 1 iCSC2014, Juan López González, University of Oviedo Introduction to machine learning Juan López González.
Unsupervised Constraint Driven Learning for Transliteration Discovery M. Chang, D. Goldwasser, D. Roth, and Y. Tu.
1 Machine Learning (Extended) Dr. Ata Kaban Algorithms to enable computers to learn –Learning = ability to improve performance automatically through experience.
Week 1 - An Introduction to Machine Learning & Soft Computing
IR Homework #3 By J. H. Wang May 4, Programming Exercise #3: Text Classification Goal: to classify each document into predefined categories Input:
Advanced Analytics on Hadoop Spring 2014 WPI, Mohamed Eltabakh 1.
Artificial Intelligence 8. Supervised and unsupervised learning Japan Advanced Institute of Science and Technology (JAIST) Yoshimasa Tsuruoka.
Machine Learning Extract from various presentations: University of Nebraska, Scott, Freund, Domingo, Hong,
DATA MINING WITH CLUSTERING AND CLASSIFICATION Spring 2007, SJSU Benjamin Lam.
Introduction Welcome Machine Learning.
Machine Learning Lecture for Methodological Foundations of Biomedical Informatics Fall 2015 (BMSC-GA 4449) Sisi Ma NYU Langone Medical Center CHIBI.
Basic Machine Learning: Clustering CS 315 – Web Search and Data Mining 1.
6.S093 Visual Recognition through Machine Learning Competition Image by kirkh.deviantart.com Joseph Lim and Aditya Khosla Acknowledgment: Many slides from.
Learning Kernel Classifiers 1. Introduction Summarized by In-Hee Lee.
Machine Learning in Practice Lecture 21 Carolyn Penstein Rosé Language Technologies Institute/ Human-Computer Interaction Institute.
SUPERVISED AND UNSUPERVISED LEARNING Presentation by Ege Saygıner CENG 784.
Introduction to Data Mining Clustering & Classification Reference: Tan et al: Introduction to data mining. Some slides are adopted from Tan et al.
Presentation prepared by Yehonatan Cohen and Danny Hendler Some of the slides based on the online book “Social media mining” Danny Hendler Advanced Topics.
Does one size really fit all? Evaluating classifiers in a Bag-of-Visual-Words classification Christian Hentschel, Harald Sack Hasso Plattner Institute.
Data Mining, Machine Learning, Data Analysis, etc. scikit-learn
Introduction to Machine Learning
Machine Learning for Computer Security
Machine Learning Clustering: K-means Supervised Learning
Machine Learning overview Chapter 18, 21
Machine Learning overview Chapter 18, 21
Make Predictions Using Azure Machine Learning Studio
Introduction Machine Learning 14/02/2017.
Chapter 6 Classification and Prediction
Data Mining 101 with Scikit-Learn
Introduction to Data Science Lecture 7 Machine Learning Overview
Pattern Recognition Sergios Theodoridis Konstantinos Koutroumbas
Estimating Link Signatures with Machine Learning Algorithms
Waikato Environment for Knowledge Analysis
By Thomas Hartmann, Assad Moawad, Francois Fouquet, Yves Le Traon
Machine Learning & Data Science
Pattern Classification All materials in these slides were taken from Pattern Classification (2nd ed) by R. O. Duda, P. E. Hart and D. G. Stork, John.
Lecture 6: Introduction to Machine Learning
Data Mining, Machine Learning, Data Analysis, etc. scikit-learn
Intro to Machine Learning
Data Mining, Machine Learning, Data Analysis, etc. scikit-learn
Text Categorization Berlin Chen 2003 Reference:
Machine Learning Algorithms – An Overview
Pattern Classification All materials in these slides were taken from Pattern Classification (2nd ed) by R. O. Duda, P. E. Hart and D. G. Stork, John.
Hairong Qi, Gonzalez Family Professor
CS+Social Good.
The Student’s Guide to Apache Spark
Machine Learning overview Chapter 18, 21
Presentation transcript:

Machine Learning on.NET F# FTW!

A few words about me  Mathias Brandewinder  Background: economics, operations research .NET developer for 10~ years (C#, F#)  Bay.Net San Francisco, SFSharp.org  Yes I have an accent 

I am assuming…  Few familiar with F#  Mostly unfamiliar with Data Science / Machine Learning  Mostly familiar with C#, VB.NET  Some familiar with Functional Languages

Why this talk  Machine Learning, Data Science are red-hot topics ›... and relevant to developers .NET is under-represented

My goal  Can’t introduce F#, Machine Learning under 1h  Give you a sense for what Machine Learning is ›Highlight some differences with “standard” development ›Mostly live code  Illustrate why I think F# is a great fit

What is Machine Learning?  "A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E“ [Tom M. Mitchell]

In English, please?  Program performs a Task using Data  The more Data, the better it gets  Rooted in statistics, math  A Computer Science problem as well ›Used in live software, with changing data

The plan  Classification  Regression  Unsupervised  Type Providers  Existing.NET libraries  Algebra  Functional fit

Classification & Regression

Goal  What does “a day of Machine Learning” look like?  Illustrate Classification and Regression

Classification, Regression  Classification = using data to classify items ›Ex: Spam vs. Ham, Character Recognition, …  Regression = predicting a number ›Ex: predict price of item given attributes, …  Both belong to Supervised Learning ›You know what question you are trying to answer ›You use data to fit a predictive model

Support Vector Machine  Classic algorithm  Tries to separate the 2 classes by the widest possible margin  Using Accord.NET implementation

Demo

Take-aways  F# is a first-class citizen in.NET  Decent libraries: Accord.NET, Math.NET, Alea.cuBase, …  Interactive experience with the REPL  Syntax matters!  Classification, Regression, Cross-Validation

Unsupervised

Goal  Illustrate unsupervised learning  Functional programming and ML are a great fit

Writing your own  Usually not advised  Useful for ML because ›You don’t always have a library ›As you learn your domain, you may need a custom model

Most ML algorithms are the same  Read data  Transform into Features  Learn a Model from the Features  Evaluate Model quality

Translates well to FP  Read data  Transform into Features -> Map  Learn a Model from the Features -> Recursion  Evaluate Model quality -> Fold/Reduce

Focus on transforms, not objects  Need to transform rapidly Features ›Don’t force your domain to fit my algorithm ›Morph around the shape of the data, pass functions ›Algorithms need to be generic  FP is fantastic for code reuse

What is Unsupervised Learning?  “Tell me something about my data”  Example: Clustering ›Find groups of “similar” entities in my dataset

Example: clustering (1)

Example: clustering (2) “Assign to closest Centroid” [Distance]

Example: clustering (3) “Update Centroids based on Cluster” [Reduce]

Example: clustering (4) “Stop when no change” [Recursion]

Demo

Type Providers

No data, no learning  Most of ML effort is spent acquiring data  Most of the World is not in your Type System  Unpleasant trade-off: ›Dynamic: easy hacking but runtime exceptions ›Static: safer, but straight-jacket

Demo

Conclusion

F# is a perfect fit for ML on.NET  Functional style fits very well with ML  REPL/interactive experience is crucial  Smooth integration with all of.NET  Type Providers: static types, without the pain

My recommendation  Take a look at Machine Learning, Data Science  Do it with a functional language  … and preferably, do it using F#  Workshop this Friday!

Getting involved  Very dynamic community  FSharp.org, the F# Foundation  Machine Learning working group, FsLab.org  Kaggle.com

Contacting me 