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
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
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.4k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
470
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
310
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.6k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
7
4.3k
CSC307 Lecture 03
javiergs
PRO
1
470
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.4k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
300
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
120
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
190
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
New Earth Scene 8
popppiees
1
1.4k
WENDY [Excerpt]
tessaabrams
9
35k
Building the Perfect Custom Keyboard
takai
2
670
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Believing is Seeing
oripsolob
1
29
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
HDC tutorial
michielstock
1
320
The SEO Collaboration Effect
kristinabergwall1
0
330
Code Review Best Practice
trishagee
74
19k
Being A Developer After 40
akosma
91
590k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
80
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