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
ngarneau
March 23, 2015
Programming
0
44
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
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
23
9.2k
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
170
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
310
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
6
740
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
260
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
21k
ふつうの技術スタックでアート作品を作ってみる
akira888
1
1.2k
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
2
15k
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
830
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
710
Deep Dive into ~/.claude/projects
hiragram
14
12k
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
260
Featured
See All Featured
Balancing Empowerment & Direction
lara
1
450
Fireside Chat
paigeccino
37
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Designing for Performance
lara
610
69k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Code Review Best Practice
trishagee
69
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
RailsConf 2023
tenderlove
30
1.1k
KATA
mclloyd
30
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
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