Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction au machine learning avec Scitkit-l...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ngarneau
March 23, 2015
Programming
0
46
Introduction au machine learning avec Scitkit-learn
Atelier d'introduction au machine learning au Web à Québec édition 2015
ngarneau
March 23, 2015
Tweet
Share
More Decks by ngarneau
See All by ngarneau
Mocks, stubs & seams
ngarneau
0
110
big data
ngarneau
5
400
Other Decks in Programming
See All in Programming
MUSUBIXとは
nahisaho
0
130
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
SourceGeneratorのススメ
htkym
0
200
Grafana:建立系統全知視角的捷徑
blueswen
0
330
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Oxlint JS plugins
kazupon
1
970
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.4k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
110
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
76
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Designing for Performance
lara
610
70k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Transcript
Introduction au machine learning avec scikit-learn Nicolas Garneau Université Laval
- L’Agence
Les bases
Prédiction à la bourse Applications du ML Analyse de comportement
Aide à la décision Classification de textes ...
S : {s1, s2, s3, ..., sn} Jeu de données
un «exemple»
S : {s1, s2, s3, ..., sn} Jeu de données
sn : {x, y} une liste de «features» un «label»
S : {s1, s2, s3, ..., sn} Jeu de données
sn : {x, y} x : {x1, x2, x3, ..., xn} chacun de nos features...
Exemple iris dataset 4 features: • Longueur pétale • Largeur
pétale • Longueur sépale • Largeur sépale
Exemple iris dataset 3 classes: Iris Setosa Iris Versicolor Iris
Virginica crédit photo: http://mirlab.org/jang/books/dcpr/dataSetIris.asp?title=2-2%20Iris%20Dataset
s1 : {(larg. sépale, long. sépale), type} Exemple iris dataset
si on sélectionne 2 features
s1 : {(larg. sépale, long. sépale), type} Exemple x1 :
{(0: 2, 1: 5), 1} x2 : {(0: 1, 1: 6), 0} ... iris dataset
Exemple iris dataset
Comment y arriver Différentes façons
K Nearest Neighbors (KNN) K plus proches voisins Mesure de
similarité
K Nearest Neighbors (KNN) Vote de majorité k = 3
K Nearest Neighbors (KNN) Vote de majorité ! k =
3
K Nearest Neighbors (KNN) Vote de majorité pondéré* !! 15
12 3 k = 3
K Nearest Neighbors
Notre problème Description du problème de classification qu’on a Classification
200 features 800 exemples 200 inconnus
Workflow 1. Pre-model 2. Model 3. Validation
1. Pre-model «Scaling» Réduction de la dimensionnalité «Imputation»
1. Pre-model Scaling Distribution normale Pour les distances...!
2. Model clf = KNeighborsClassifier(n_neighbors=35) clf.fit(X, y) clf.predict(X_mystery)
3. Validation Train/test sets Score «Cross-validation»
3. Validation Score precision: TP / (TP + FP) recall:
TP / (TP + FN) f1-score: 2TP / (2TP + FP + FN)
Bonus! Bagging