SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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)
 

Similaire à 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
 

Similaire à 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
 

Plus de rocketcircus

Plus de 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
 

Dernier

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Dernier (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

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