SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
ML made easy
                            jss 2011-05-19
Thursday, May 19, 2011
Google Prediction API

                 •       The announced subject of this session

                 •       RESTful machine learning service

                 •       Limits: no access to models (or any internals), max. 100 MB training
                         data, max. 40k predictions/day (100 in free tier)

                 •       No fun for serious use

                 •       Might work well for ppl w/o background in ML


Thursday, May 19, 2011
Still:

                              Simple, unified API to access range of ML algorithms plus measures
                              and infrastructure for parameter search

                     would be good thing to have. Enter:




Thursday, May 19, 2011
scikits.learn



                 •       Python module for machine learning,
                         built on scipy & numpy

                 •       Started in 2007 as GSoC, main contrib
                         by INRIA

Thursday, May 19, 2011
Features

                 •       Solid: Supervised learning: Support Vector Machines, Generalized
                         Linear Models

                 •       Work in progress: Unsupervised learning: Clustering, Gaussian
                         mixture models, manifold learning, ICA, Gaussian Processes

                 •       Planed: Gaussian graphical models, matrix factorization



Thursday, May 19, 2011
Back End


                 •       Own Numpy/SciPy implementations

                 •       C/C++ modules (liblinear & libsvm)

                 •       Cython (linear models not covered w/ liblinear)

                 •       Multi-processing



Thursday, May 19, 2011
Docs

                 •       In-depth RST documentation

                 •       Interfaces, Narrative, Method Background, Practical Tips

                 •       Lots of examples

                 •       Active community & mailing list

                 •       Developer: optimization, conventions, etc.


Thursday, May 19, 2011
API


                     clf = Classifier(kernel=‘rbf’)   clf is a (pickel-able)
                                                          model object
                     clf.fit(X, y)
                     clf.predict(y2)                   same API for all
                                                        ML techniques




Thursday, May 19, 2011
Full Example

                     from scikits.learn.svm import SVC
                     from scikits.learn.metrics import classification_report
                     from numpy import array
                     X = array([[1, 1, 1], [1, 0, 1], [0, 1, 1], [0, 0, 1], ..])
                     y = array([0, 1, 1, 0, ..])
                     N = 4
                     clf = SVC(kernel='rbf', gamma=1e-4, C=1000)
                     clf.fit(X[:N], y[:N])
                     pred = clf.predict(X[N:])
                     print classification_report(y[N:], pred)



Thursday, May 19, 2011
Grid Param Search
                     Classification report for the best estimator:
                     SVC(kernel=rbf, C=10, probability=False, degree=3, coef0=0.0, tol=0.001,
                       cache_size=100.0, shrinking=True, gamma=0.001)
                     Tuned for 'precision' with optimal value: 1.000
                                  precision    recall f1-score     support

                               0       1.00      1.00      1.00      1000
                               1       1.00      1.00      1.00      1000

                     avg / total       1.00      1.00      1.00      2000

                     Grid scores:
                     [({'C': 1, 'gamma': 0.001, 'kernel': 'rbf'}, 0.66544212631169153),
                      ({'C': 1, 'gamma': 0.0001, 'kernel': 'rbf'}, 0.66544212631169153),
                      ({'C': 10, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0),
                      ({'C': 10, 'gamma': 0.0001, 'kernel': 'rbf'}, 0.66544212631169153),
                      ({'C': 100, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0),
                      ({'C': 100, 'gamma': 0.0001, 'kernel': 'rbf'}, 1.0),
                      ({'C': 1000, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0),
                      ({'C': 1000, 'gamma': 0.0001, 'kernel': 'rbf'}, 1.0),
                      ({'C': 1, 'kernel': 'linear'}, 1.0),
                      ({'C': 10, 'kernel': 'linear'}, 1.0),



Thursday, May 19, 2011
and so many examples
                                      GMM




Thursday, May 19, 2011

Weitere ähnliche Inhalte

Andere mochten auch

Wcps facilities plan
Wcps facilities planWcps facilities plan
Wcps facilities plankatie8433
 
The Web 2.0 Classroom
The Web 2.0 ClassroomThe Web 2.0 Classroom
The Web 2.0 Classroomrobconnor
 
Longo KI University/College Furniture Catalog (2012)
Longo KI University/College Furniture Catalog (2012)Longo KI University/College Furniture Catalog (2012)
Longo KI University/College Furniture Catalog (2012)LongoLabs
 
Cropcircle2010
Cropcircle2010Cropcircle2010
Cropcircle2010gorin2008
 
Article circlesin grain
Article circlesin grainArticle circlesin grain
Article circlesin graingorin2008
 
Health and illness juan-cano
Health and illness juan-canoHealth and illness juan-cano
Health and illness juan-canolola caravaca
 
Changing planet interview
Changing planet interviewChanging planet interview
Changing planet interviewgorin2008
 
Alien digest vol_1
Alien digest vol_1Alien digest vol_1
Alien digest vol_1gorin2008
 
Unit 1 jorge-berenguer
Unit  1 jorge-berenguerUnit  1 jorge-berenguer
Unit 1 jorge-berenguerlola caravaca
 
Health and illness project de science (2)
Health and illness project de science (2)Health and illness project de science (2)
Health and illness project de science (2)lola caravaca
 

Andere mochten auch (20)

Fssm slideshow
Fssm slideshowFssm slideshow
Fssm slideshow
 
Muebles case
Muebles caseMuebles case
Muebles case
 
Pytables
PytablesPytables
Pytables
 
Wcps facilities plan
Wcps facilities planWcps facilities plan
Wcps facilities plan
 
Www officesalesusa-com (1)
Www officesalesusa-com (1)Www officesalesusa-com (1)
Www officesalesusa-com (1)
 
The Web 2.0 Classroom
The Web 2.0 ClassroomThe Web 2.0 Classroom
The Web 2.0 Classroom
 
Longo KI University/College Furniture Catalog (2012)
Longo KI University/College Furniture Catalog (2012)Longo KI University/College Furniture Catalog (2012)
Longo KI University/College Furniture Catalog (2012)
 
Health and illness
Health and illnessHealth and illness
Health and illness
 
Cropcircle2010
Cropcircle2010Cropcircle2010
Cropcircle2010
 
Article circlesin grain
Article circlesin grainArticle circlesin grain
Article circlesin grain
 
Nazi
NaziNazi
Nazi
 
Health and illness juan-cano
Health and illness juan-canoHealth and illness juan-cano
Health and illness juan-cano
 
Changing planet interview
Changing planet interviewChanging planet interview
Changing planet interview
 
Health and illness
Health and illnessHealth and illness
Health and illness
 
Articles
ArticlesArticles
Articles
 
Corporate
CorporateCorporate
Corporate
 
Corporate
CorporateCorporate
Corporate
 
Alien digest vol_1
Alien digest vol_1Alien digest vol_1
Alien digest vol_1
 
Unit 1 jorge-berenguer
Unit  1 jorge-berenguerUnit  1 jorge-berenguer
Unit 1 jorge-berenguer
 
Health and illness project de science (2)
Health and illness project de science (2)Health and illness project de science (2)
Health and illness project de science (2)
 

Ähnlich wie intro to scikits.learn

Standardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for PythonStandardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for PythonRalf Gommers
 
Scalable Deep Learning on AWS with Apache MXNet
Scalable Deep Learning on AWS with Apache MXNetScalable Deep Learning on AWS with Apache MXNet
Scalable Deep Learning on AWS with Apache MXNetJulien SIMON
 
Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)Oswald Campesato
 
London useR Meeting 21-Jul-09
London useR Meeting 21-Jul-09London useR Meeting 21-Jul-09
London useR Meeting 21-Jul-09bwhitcher
 
Standardizing arrays -- Microsoft Presentation
Standardizing arrays -- Microsoft PresentationStandardizing arrays -- Microsoft Presentation
Standardizing arrays -- Microsoft PresentationTravis Oliphant
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningOswald Campesato
 
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...Chester Chen
 
Artificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningArtificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningSujit Pal
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningOswald Campesato
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxIvo Andreev
 
Python as number crunching code glue
Python as number crunching code gluePython as number crunching code glue
Python as number crunching code glueJiahao Chen
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to pythonActiveState
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxRuby Shrestha
 
Europython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonEuropython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonJavier Arias Losada
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer FarooquiDatabricks
 
Python image processing_Python image processing.pptx
Python image processing_Python image processing.pptxPython image processing_Python image processing.pptx
Python image processing_Python image processing.pptxshashikant484397
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)Qiangning Hong
 
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From ScratchPR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From ScratchSunghoon Joo
 

Ähnlich wie intro to scikits.learn (20)

MXNet Workshop
MXNet WorkshopMXNet Workshop
MXNet Workshop
 
Standardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for PythonStandardizing on a single N-dimensional array API for Python
Standardizing on a single N-dimensional array API for Python
 
Scalable Deep Learning on AWS with Apache MXNet
Scalable Deep Learning on AWS with Apache MXNetScalable Deep Learning on AWS with Apache MXNet
Scalable Deep Learning on AWS with Apache MXNet
 
Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)Java and Deep Learning (Introduction)
Java and Deep Learning (Introduction)
 
Java and Deep Learning
Java and Deep LearningJava and Deep Learning
Java and Deep Learning
 
London useR Meeting 21-Jul-09
London useR Meeting 21-Jul-09London useR Meeting 21-Jul-09
London useR Meeting 21-Jul-09
 
Standardizing arrays -- Microsoft Presentation
Standardizing arrays -- Microsoft PresentationStandardizing arrays -- Microsoft Presentation
Standardizing arrays -- Microsoft Presentation
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
 
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...
SF Big Analytics 2022-03-15: Persia: Scaling DL Based Recommenders up to 100 ...
 
Artificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep LearningArtificial Intelligence, Machine Learning and Deep Learning
Artificial Intelligence, Machine Learning and Deep Learning
 
D3, TypeScript, and Deep Learning
D3, TypeScript, and Deep LearningD3, TypeScript, and Deep Learning
D3, TypeScript, and Deep Learning
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
 
Python as number crunching code glue
Python as number crunching code gluePython as number crunching code glue
Python as number crunching code glue
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
 
Europython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with PythonEuropython - Machine Learning for dummies with Python
Europython - Machine Learning for dummies with Python
 
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 Separating Hype from Reality in Deep Learning with Sameer Farooqui Separating Hype from Reality in Deep Learning with Sameer Farooqui
Separating Hype from Reality in Deep Learning with Sameer Farooqui
 
Python image processing_Python image processing.pptx
Python image processing_Python image processing.pptxPython image processing_Python image processing.pptx
Python image processing_Python image processing.pptx
 
Python高级编程(二)
Python高级编程(二)Python高级编程(二)
Python高级编程(二)
 
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From ScratchPR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
 

Mehr von rocketcircus

Mehr von rocketcircus (7)

Descriptor Protocol
Descriptor ProtocolDescriptor Protocol
Descriptor Protocol
 
Descriptor Protocol
Descriptor ProtocolDescriptor Protocol
Descriptor Protocol
 
Python Academy
Python AcademyPython Academy
Python Academy
 
AWS Quick Intro
AWS Quick IntroAWS Quick Intro
AWS Quick Intro
 
PyPy 1.5
PyPy 1.5PyPy 1.5
PyPy 1.5
 
Message Queues
Message QueuesMessage Queues
Message Queues
 
Rocket Circus on Code Review
Rocket Circus on Code ReviewRocket Circus on Code Review
Rocket Circus on Code Review
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

intro to scikits.learn

  • 1. ML made easy jss 2011-05-19 Thursday, May 19, 2011
  • 2. Google Prediction API • The announced subject of this session • RESTful machine learning service • Limits: no access to models (or any internals), max. 100 MB training data, max. 40k predictions/day (100 in free tier) • No fun for serious use • Might work well for ppl w/o background in ML Thursday, May 19, 2011
  • 3. Still: Simple, unified API to access range of ML algorithms plus measures and infrastructure for parameter search would be good thing to have. Enter: Thursday, May 19, 2011
  • 4. scikits.learn • Python module for machine learning, built on scipy & numpy • Started in 2007 as GSoC, main contrib by INRIA Thursday, May 19, 2011
  • 5. Features • Solid: Supervised learning: Support Vector Machines, Generalized Linear Models • Work in progress: Unsupervised learning: Clustering, Gaussian mixture models, manifold learning, ICA, Gaussian Processes • Planed: Gaussian graphical models, matrix factorization Thursday, May 19, 2011
  • 6. Back End • Own Numpy/SciPy implementations • C/C++ modules (liblinear & libsvm) • Cython (linear models not covered w/ liblinear) • Multi-processing Thursday, May 19, 2011
  • 7. Docs • In-depth RST documentation • Interfaces, Narrative, Method Background, Practical Tips • Lots of examples • Active community & mailing list • Developer: optimization, conventions, etc. Thursday, May 19, 2011
  • 8. API clf = Classifier(kernel=‘rbf’) clf is a (pickel-able) model object clf.fit(X, y) clf.predict(y2) same API for all ML techniques Thursday, May 19, 2011
  • 9. Full Example from scikits.learn.svm import SVC from scikits.learn.metrics import classification_report from numpy import array X = array([[1, 1, 1], [1, 0, 1], [0, 1, 1], [0, 0, 1], ..]) y = array([0, 1, 1, 0, ..]) N = 4 clf = SVC(kernel='rbf', gamma=1e-4, C=1000) clf.fit(X[:N], y[:N]) pred = clf.predict(X[N:]) print classification_report(y[N:], pred) Thursday, May 19, 2011
  • 10. Grid Param Search Classification report for the best estimator: SVC(kernel=rbf, C=10, probability=False, degree=3, coef0=0.0, tol=0.001, cache_size=100.0, shrinking=True, gamma=0.001) Tuned for 'precision' with optimal value: 1.000 precision recall f1-score support 0 1.00 1.00 1.00 1000 1 1.00 1.00 1.00 1000 avg / total 1.00 1.00 1.00 2000 Grid scores: [({'C': 1, 'gamma': 0.001, 'kernel': 'rbf'}, 0.66544212631169153), ({'C': 1, 'gamma': 0.0001, 'kernel': 'rbf'}, 0.66544212631169153), ({'C': 10, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0), ({'C': 10, 'gamma': 0.0001, 'kernel': 'rbf'}, 0.66544212631169153), ({'C': 100, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0), ({'C': 100, 'gamma': 0.0001, 'kernel': 'rbf'}, 1.0), ({'C': 1000, 'gamma': 0.001, 'kernel': 'rbf'}, 1.0), ({'C': 1000, 'gamma': 0.0001, 'kernel': 'rbf'}, 1.0), ({'C': 1, 'kernel': 'linear'}, 1.0), ({'C': 10, 'kernel': 'linear'}, 1.0), Thursday, May 19, 2011
  • 11. and so many examples GMM Thursday, May 19, 2011