SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Scikit Learn
Apprentissage statistique en Python
Ga¨el Varoquaux —
http://scikit-learn.org
Vision du projet
L’apprentissage statistique pour tous
Pas de domaine d’application sp´ecifique
Pas de pr´erequis en machine learning
Librairie logicielle de qualit´e
API pens´ees pour l’utilisateur
D´eveloppement communautaire
License BSD, contributeurs tr`es vari´es
Philosophie
1. Keep it simple
Ne pas chercher `a tout r´esoudre
2. Facilit´e d’utilisation
Bonne documentation
Facile `a debugger
3. Efficacit´e num´erique
Dans les limites de 1
4. Limiter les d´ependances
La distribution est un probl`eme en soit
Choix technologiques
Python, what else?
Langage haut-niveau,
- interactif,
- facile `a debugger,
- d’application g´en´erale
´Ecosyst`eme tr`es dynamique
Choix technologiques
+ Numpy
+ Scipy
calcul num´erique, alg`ebre
lin´eaire, algorithmique sur graphe
numpy.array: conteneur
universel de donn´ees structur´ees
Les outils des sciences
num´eriques sont sous-utilis´es
par la communaut´e “data”
Performance
scikit-learn mlpy pybrain pymvpa mdp shogun
SVM 5.2 9.47 17.5 11.52 40.48 5.63
LARS 1.17 105.3 - 37.35 - -
Elastic Net 0.52 73.7 - 1.44 - -
kNN 0.57 1.41 - 0.56 0.58 1.36
PCA 0.18 - - 8.93 0.47 0.33
k-Means 1.34 0.79 ∞ - 35.75 0.68
Optimisations algorithmiques et non bas niveau
Minimiser les copies des donn´ees
API: sp´ecifier un mod`ele
Un concept central: l’estimateur
Instanci´e sans les donn´ees
Mais en sp´ecifiant ses param`etres
from s k l e a r n . n e i g h b o r s import
KNear estNeig hbo r s
e s t i m a t o r = KN ea r estNe ig h b or s (
n n e i g h b o r s =2)
API: entraˆıner un mod`ele
Apprendre `a partir de donn´ees
e s t i m a t o r . f i t (X, Y)
o`u:
X est un tableau numpy de forme
nobservations × ndescripteurs
y est un tableau numpy, entier ou flottant
nobservations
API: utiliser un mod`ele
Prediction: classification, regression
Y t e s t = e s t i m a t o r . p r e d i c t ( X t e s t )
Transformation: reduction de dimension, filtre
X new = e s t i m a t o r . t r a n s f o r m ( X t e s t )
Estimation de densit´e, vraissemblance
t e s t s c o r e = e s t i m a t o r . s c o r e ( X t e s t )
Estimation “en-line”
e s t i m a t o r . p a r t i a l f i t (X, Y)
Vectorization
Passer des donn´ees brutes `a la matrices X
Pour le texte: compter les occurrences de mots
- Donn´ees d’entr´ee: liste de documents (string)
- Donn´ees de sortie: matrice num´erique
from s k l e a r n . f e a t u r e e x t r a c t i o n . t e x t
import H a s h i n g V e c t o r i z e r
h a s h e r = H a s h i n g V e c t o r i z e r ()
X = h a s h e r . f i t t r a n s f o r m ( documents )
Fonctionalit´es
Apprentissage supervis´e
Arbres de d´ecision (Random-Forest, Boosted Tree)
Mod`eles lin´eaires
SVM
Apprentissage non supervis´e
Clustering
Apprentissage de dictionnaire
D´etection d’outliers
S´election de mod`eles
Validation crois´ee int´egr´ee
Optimisation de param`etres
Quelques estimateurs
http://scikit-learn.org/stable/auto_examples/plot_
classifier_comparison.html
Quelques estimateurs
http://scikit-learn.org/stable/auto_examples/plot_
classifier_comparison.html
Clustering
http://scikit-learn.org/stable/auto_examples/cluster/
plot_cluster_comparison.html
Scikit-learn
http://scikit-learn.org
Projet tr`es dynamique
Bien document´e
N´ecessite un peu de savoir-faire technique
Facile `a int´egrer/adapter
PS: Je cherche `a embaucher un ing´enieur
@GaelVaroquaux

Mais conteúdo relacionado

Mais procurados

Correction examen-java-avancé-1
Correction examen-java-avancé-1Correction examen-java-avancé-1
Correction examen-java-avancé-1
vangogue
 

Mais procurados (20)

5.2 Régression linéaire
5.2 Régression linéaire5.2 Régression linéaire
5.2 Régression linéaire
 
5.5 Clustering
5.5 Clustering5.5 Clustering
5.5 Clustering
 
Les 10 plus populaires algorithmes du machine learning
Les 10 plus populaires algorithmes du machine learningLes 10 plus populaires algorithmes du machine learning
Les 10 plus populaires algorithmes du machine learning
 
Théorie de l’apprentissage et SVM : présentation rapide et premières idées da...
Théorie de l’apprentissage et SVM : présentation rapide et premières idées da...Théorie de l’apprentissage et SVM : présentation rapide et premières idées da...
Théorie de l’apprentissage et SVM : présentation rapide et premières idées da...
 
Introduction au Deep Learning
Introduction au Deep Learning Introduction au Deep Learning
Introduction au Deep Learning
 
Les systèmes de recommandations
Les systèmes de recommandationsLes systèmes de recommandations
Les systèmes de recommandations
 
Knn
KnnKnn
Knn
 
clustering
clusteringclustering
clustering
 
BigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-ReduceBigData_TP1: Initiation à Hadoop et Map-Reduce
BigData_TP1: Initiation à Hadoop et Map-Reduce
 
Arbre de décision
Arbre de décisionArbre de décision
Arbre de décision
 
Intelligence Artificielle : Introduction à l'intelligence artificielle
Intelligence Artificielle : Introduction à l'intelligence artificielleIntelligence Artificielle : Introduction à l'intelligence artificielle
Intelligence Artificielle : Introduction à l'intelligence artificielle
 
La classification des Emails utilisant le modèle MapReduce
La classification des Emails utilisant le modèle MapReduce La classification des Emails utilisant le modèle MapReduce
La classification des Emails utilisant le modèle MapReduce
 
exercices business intelligence
exercices business intelligence exercices business intelligence
exercices business intelligence
 
Cours acp mehdi_aman
Cours acp mehdi_amanCours acp mehdi_aman
Cours acp mehdi_aman
 
Introduction à Python
Introduction à PythonIntroduction à Python
Introduction à Python
 
Techniques du data mining
Techniques du data miningTechniques du data mining
Techniques du data mining
 
Correction examen-java-avancé-1
Correction examen-java-avancé-1Correction examen-java-avancé-1
Correction examen-java-avancé-1
 
BigData_TP4 : Cassandra
BigData_TP4 : CassandraBigData_TP4 : Cassandra
BigData_TP4 : Cassandra
 
Analyse Factorielle des Correspondances
Analyse Factorielle des CorrespondancesAnalyse Factorielle des Correspondances
Analyse Factorielle des Correspondances
 
Machine-learning-FR.pdf
Machine-learning-FR.pdfMachine-learning-FR.pdf
Machine-learning-FR.pdf
 

Destaque

Sondage aléatoire simple ou a probabilité égal
Sondage aléatoire simple ou a probabilité égal Sondage aléatoire simple ou a probabilité égal
Sondage aléatoire simple ou a probabilité égal
hammamiahlem1
 
Je configure mes serveurs avec fabric et fabtools
Je configure mes serveurs avec fabric et fabtoolsJe configure mes serveurs avec fabric et fabtools
Je configure mes serveurs avec fabric et fabtools
Ronan Amicel
 

Destaque (20)

Scikit-learn: apprentissage statistique en Python. Créer des machines intelli...
Scikit-learn: apprentissage statistique en Python. Créer des machines intelli...Scikit-learn: apprentissage statistique en Python. Créer des machines intelli...
Scikit-learn: apprentissage statistique en Python. Créer des machines intelli...
 
Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016Scikit-learn: the state of the union 2016
Scikit-learn: the state of the union 2016
 
Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of data
 
A hand-waving introduction to sparsity for compressed tomography reconstruction
A hand-waving introduction to sparsity for compressed tomography reconstructionA hand-waving introduction to sparsity for compressed tomography reconstruction
A hand-waving introduction to sparsity for compressed tomography reconstruction
 
Advanced network modelling 2: connectivity measures, goup analysis
Advanced network modelling 2: connectivity measures, goup analysisAdvanced network modelling 2: connectivity measures, goup analysis
Advanced network modelling 2: connectivity measures, goup analysis
 
Processing biggish data on commodity hardware: simple Python patterns
Processing biggish data on commodity hardware: simple Python patternsProcessing biggish data on commodity hardware: simple Python patterns
Processing biggish data on commodity hardware: simple Python patterns
 
Succeeding in academia despite doing good_software
Succeeding in academia despite doing good_softwareSucceeding in academia despite doing good_software
Succeeding in academia despite doing good_software
 
On the code of data science
On the code of data scienceOn the code of data science
On the code of data science
 
Aiguille dans botte de foin: scikit-learn et joblib
Aiguille dans botte de foin: scikit-learn et joblibAiguille dans botte de foin: scikit-learn et joblib
Aiguille dans botte de foin: scikit-learn et joblib
 
Scikit-learn for easy machine learning: the vision, the tool, and the project
Scikit-learn for easy machine learning: the vision, the tool, and the projectScikit-learn for easy machine learning: the vision, the tool, and the project
Scikit-learn for easy machine learning: the vision, the tool, and the project
 
Open Source Scientific Software
Open Source Scientific SoftwareOpen Source Scientific Software
Open Source Scientific Software
 
Sondage aléatoire simple ou a probabilité égal
Sondage aléatoire simple ou a probabilité égal Sondage aléatoire simple ou a probabilité égal
Sondage aléatoire simple ou a probabilité égal
 
Je configure mes serveurs avec fabric et fabtools
Je configure mes serveurs avec fabric et fabtoolsJe configure mes serveurs avec fabric et fabtools
Je configure mes serveurs avec fabric et fabtools
 
Inter-site autism biomarkers from resting state fMRI
Inter-site autism biomarkers from resting state fMRIInter-site autism biomarkers from resting state fMRI
Inter-site autism biomarkers from resting state fMRI
 
Connectomics: Parcellations and Network Analysis Methods
Connectomics: Parcellations and Network Analysis MethodsConnectomics: Parcellations and Network Analysis Methods
Connectomics: Parcellations and Network Analysis Methods
 
Machine learning and cognitive neuroimaging: new tools can answer new questions
Machine learning and cognitive neuroimaging: new tools can answer new questionsMachine learning and cognitive neuroimaging: new tools can answer new questions
Machine learning and cognitive neuroimaging: new tools can answer new questions
 
Python et NoSQL
Python et NoSQLPython et NoSQL
Python et NoSQL
 
Brain reading, compressive sensing, fMRI and statistical learning in Python
Brain reading, compressive sensing, fMRI and statistical learning in PythonBrain reading, compressive sensing, fMRI and statistical learning in Python
Brain reading, compressive sensing, fMRI and statistical learning in Python
 
Brain maps from machine learning? Spatial regularizations
Brain maps from machine learning? Spatial regularizationsBrain maps from machine learning? Spatial regularizations
Brain maps from machine learning? Spatial regularizations
 
Python packaging
Python packagingPython packaging
Python packaging
 

Semelhante a Scikit learn: apprentissage statistique en Python

Owf 2013 rii panorama leroy
Owf 2013 rii panorama leroyOwf 2013 rii panorama leroy
Owf 2013 rii panorama leroy
Patrick MOREAU
 
Chapitre i introduction et motivations
Chapitre i introduction et motivationsChapitre i introduction et motivations
Chapitre i introduction et motivations
Sana Aroussi
 
INF120 - Algo DUT SRC1 - Cours 3
INF120 - Algo DUT SRC1 - Cours 3INF120 - Algo DUT SRC1 - Cours 3
INF120 - Algo DUT SRC1 - Cours 3
PGambette
 
Cours python avancé
Cours python avancéCours python avancé
Cours python avancé
pierrepo
 

Semelhante a Scikit learn: apprentissage statistique en Python (20)

Mathématiques et Python
Mathématiques et PythonMathématiques et Python
Mathématiques et Python
 
Owf 2013 rii panorama leroy
Owf 2013 rii panorama leroyOwf 2013 rii panorama leroy
Owf 2013 rii panorama leroy
 
Intro_DeepLearning.pdf
Intro_DeepLearning.pdfIntro_DeepLearning.pdf
Intro_DeepLearning.pdf
 
Converso Tab
Converso TabConverso Tab
Converso Tab
 
PJ - machine learning avec scikit-learn.pdf
PJ - machine learning avec scikit-learn.pdfPJ - machine learning avec scikit-learn.pdf
PJ - machine learning avec scikit-learn.pdf
 
Python For Data Science - French Course
Python For Data Science - French CoursePython For Data Science - French Course
Python For Data Science - French Course
 
Chapitre i introduction et motivations
Chapitre i introduction et motivationsChapitre i introduction et motivations
Chapitre i introduction et motivations
 
langage C++
langage C++langage C++
langage C++
 
INF120 - Algo DUT SRC1 - Cours 3
INF120 - Algo DUT SRC1 - Cours 3INF120 - Algo DUT SRC1 - Cours 3
INF120 - Algo DUT SRC1 - Cours 3
 
Analyse de données fonctionnelles par Machines à Vecteurs de Support (SVM)
Analyse de données fonctionnelles par Machines à Vecteurs de Support (SVM) Analyse de données fonctionnelles par Machines à Vecteurs de Support (SVM)
Analyse de données fonctionnelles par Machines à Vecteurs de Support (SVM)
 
Génération automatique de texte
Génération automatique de texteGénération automatique de texte
Génération automatique de texte
 
Réalisation d'un mashup de données avec DSS de Dataiku - Première partie
Réalisation d'un mashup de données avec DSS de Dataiku - Première partieRéalisation d'un mashup de données avec DSS de Dataiku - Première partie
Réalisation d'un mashup de données avec DSS de Dataiku - Première partie
 
Résumé ai
Résumé aiRésumé ai
Résumé ai
 
NOISE: Statistiques exploratoires avec R
NOISE: Statistiques exploratoires avec RNOISE: Statistiques exploratoires avec R
NOISE: Statistiques exploratoires avec R
 
Cours python avancé
Cours python avancéCours python avancé
Cours python avancé
 
logistic_regression_ml.pdf
logistic_regression_ml.pdflogistic_regression_ml.pdf
logistic_regression_ml.pdf
 
Matinale "Data Science et Machine Learning"
Matinale "Data Science et Machine Learning"Matinale "Data Science et Machine Learning"
Matinale "Data Science et Machine Learning"
 
Deck 11
Deck 11Deck 11
Deck 11
 
Machine Leargning_supérvisé.pptx
Machine Leargning_supérvisé.pptxMachine Leargning_supérvisé.pptx
Machine Leargning_supérvisé.pptx
 
Formation python micro club.net
Formation python micro club.netFormation python micro club.net
Formation python micro club.net
 

Mais de Gael Varoquaux

Similarity encoding for learning on dirty categorical variables
Similarity encoding for learning on dirty categorical variablesSimilarity encoding for learning on dirty categorical variables
Similarity encoding for learning on dirty categorical variables
Gael Varoquaux
 
Simple representations for learning: factorizations and similarities
Simple representations for learning: factorizations and similarities Simple representations for learning: factorizations and similarities
Simple representations for learning: factorizations and similarities
Gael Varoquaux
 

Mais de Gael Varoquaux (20)

Evaluating machine learning models and their diagnostic value
Evaluating machine learning models and their diagnostic valueEvaluating machine learning models and their diagnostic value
Evaluating machine learning models and their diagnostic value
 
Measuring mental health with machine learning and brain imaging
Measuring mental health with machine learning and brain imagingMeasuring mental health with machine learning and brain imaging
Measuring mental health with machine learning and brain imaging
 
Machine learning with missing values
Machine learning with missing valuesMachine learning with missing values
Machine learning with missing values
 
Dirty data science machine learning on non-curated data
Dirty data science machine learning on non-curated dataDirty data science machine learning on non-curated data
Dirty data science machine learning on non-curated data
 
Representation learning in limited-data settings
Representation learning in limited-data settingsRepresentation learning in limited-data settings
Representation learning in limited-data settings
 
Better neuroimaging data processing: driven by evidence, open communities, an...
Better neuroimaging data processing: driven by evidence, open communities, an...Better neuroimaging data processing: driven by evidence, open communities, an...
Better neuroimaging data processing: driven by evidence, open communities, an...
 
Functional-connectome biomarkers to meet clinical needs?
Functional-connectome biomarkers to meet clinical needs?Functional-connectome biomarkers to meet clinical needs?
Functional-connectome biomarkers to meet clinical needs?
 
Atlases of cognition with large-scale human brain mapping
Atlases of cognition with large-scale human brain mappingAtlases of cognition with large-scale human brain mapping
Atlases of cognition with large-scale human brain mapping
 
Similarity encoding for learning on dirty categorical variables
Similarity encoding for learning on dirty categorical variablesSimilarity encoding for learning on dirty categorical variables
Similarity encoding for learning on dirty categorical variables
 
Machine learning for functional connectomes
Machine learning for functional connectomesMachine learning for functional connectomes
Machine learning for functional connectomes
 
Towards psychoinformatics with machine learning and brain imaging
Towards psychoinformatics with machine learning and brain imagingTowards psychoinformatics with machine learning and brain imaging
Towards psychoinformatics with machine learning and brain imaging
 
Simple representations for learning: factorizations and similarities
Simple representations for learning: factorizations and similarities Simple representations for learning: factorizations and similarities
Simple representations for learning: factorizations and similarities
 
A tutorial on Machine Learning, with illustrations for MR imaging
A tutorial on Machine Learning, with illustrations for MR imagingA tutorial on Machine Learning, with illustrations for MR imaging
A tutorial on Machine Learning, with illustrations for MR imaging
 
Scikit-learn and nilearn: Democratisation of machine learning for brain imaging
Scikit-learn and nilearn: Democratisation of machine learning for brain imagingScikit-learn and nilearn: Democratisation of machine learning for brain imaging
Scikit-learn and nilearn: Democratisation of machine learning for brain imaging
 
Computational practices for reproducible science
Computational practices for reproducible scienceComputational practices for reproducible science
Computational practices for reproducible science
 
Coding for science and innovation
Coding for science and innovationCoding for science and innovation
Coding for science and innovation
 
Estimating Functional Connectomes: Sparsity’s Strength and Limitations
Estimating Functional Connectomes: Sparsity’s Strength and LimitationsEstimating Functional Connectomes: Sparsity’s Strength and Limitations
Estimating Functional Connectomes: Sparsity’s Strength and Limitations
 
Social-sparsity brain decoders: faster spatial sparsity
Social-sparsity brain decoders: faster spatial sparsitySocial-sparsity brain decoders: faster spatial sparsity
Social-sparsity brain decoders: faster spatial sparsity
 
Simple big data, in Python
Simple big data, in PythonSimple big data, in Python
Simple big data, in Python
 
Building a cutting-edge data processing environment on a budget
Building a cutting-edge data processing environment on a budgetBuilding a cutting-edge data processing environment on a budget
Building a cutting-edge data processing environment on a budget
 

Scikit learn: apprentissage statistique en Python

  • 1. Scikit Learn Apprentissage statistique en Python Ga¨el Varoquaux — http://scikit-learn.org
  • 2. Vision du projet L’apprentissage statistique pour tous Pas de domaine d’application sp´ecifique Pas de pr´erequis en machine learning Librairie logicielle de qualit´e API pens´ees pour l’utilisateur D´eveloppement communautaire License BSD, contributeurs tr`es vari´es
  • 3. Philosophie 1. Keep it simple Ne pas chercher `a tout r´esoudre 2. Facilit´e d’utilisation Bonne documentation Facile `a debugger 3. Efficacit´e num´erique Dans les limites de 1 4. Limiter les d´ependances La distribution est un probl`eme en soit
  • 4. Choix technologiques Python, what else? Langage haut-niveau, - interactif, - facile `a debugger, - d’application g´en´erale ´Ecosyst`eme tr`es dynamique
  • 5. Choix technologiques + Numpy + Scipy calcul num´erique, alg`ebre lin´eaire, algorithmique sur graphe numpy.array: conteneur universel de donn´ees structur´ees Les outils des sciences num´eriques sont sous-utilis´es par la communaut´e “data”
  • 6. Performance scikit-learn mlpy pybrain pymvpa mdp shogun SVM 5.2 9.47 17.5 11.52 40.48 5.63 LARS 1.17 105.3 - 37.35 - - Elastic Net 0.52 73.7 - 1.44 - - kNN 0.57 1.41 - 0.56 0.58 1.36 PCA 0.18 - - 8.93 0.47 0.33 k-Means 1.34 0.79 ∞ - 35.75 0.68 Optimisations algorithmiques et non bas niveau Minimiser les copies des donn´ees
  • 7. API: sp´ecifier un mod`ele Un concept central: l’estimateur Instanci´e sans les donn´ees Mais en sp´ecifiant ses param`etres from s k l e a r n . n e i g h b o r s import KNear estNeig hbo r s e s t i m a t o r = KN ea r estNe ig h b or s ( n n e i g h b o r s =2)
  • 8. API: entraˆıner un mod`ele Apprendre `a partir de donn´ees e s t i m a t o r . f i t (X, Y) o`u: X est un tableau numpy de forme nobservations × ndescripteurs y est un tableau numpy, entier ou flottant nobservations
  • 9. API: utiliser un mod`ele Prediction: classification, regression Y t e s t = e s t i m a t o r . p r e d i c t ( X t e s t ) Transformation: reduction de dimension, filtre X new = e s t i m a t o r . t r a n s f o r m ( X t e s t ) Estimation de densit´e, vraissemblance t e s t s c o r e = e s t i m a t o r . s c o r e ( X t e s t ) Estimation “en-line” e s t i m a t o r . p a r t i a l f i t (X, Y)
  • 10. Vectorization Passer des donn´ees brutes `a la matrices X Pour le texte: compter les occurrences de mots - Donn´ees d’entr´ee: liste de documents (string) - Donn´ees de sortie: matrice num´erique from s k l e a r n . f e a t u r e e x t r a c t i o n . t e x t import H a s h i n g V e c t o r i z e r h a s h e r = H a s h i n g V e c t o r i z e r () X = h a s h e r . f i t t r a n s f o r m ( documents )
  • 11. Fonctionalit´es Apprentissage supervis´e Arbres de d´ecision (Random-Forest, Boosted Tree) Mod`eles lin´eaires SVM Apprentissage non supervis´e Clustering Apprentissage de dictionnaire D´etection d’outliers S´election de mod`eles Validation crois´ee int´egr´ee Optimisation de param`etres
  • 15. Scikit-learn http://scikit-learn.org Projet tr`es dynamique Bien document´e N´ecessite un peu de savoir-faire technique Facile `a int´egrer/adapter PS: Je cherche `a embaucher un ing´enieur @GaelVaroquaux