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
Data-Centric Kaggle
isax1015
2
780
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
740
Raku Raku Notion 20260128
hareyakayuruyaka
0
310
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
320
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.6k
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
Fragmented Architectures
denyspoltorak
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
580
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
68
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
83
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Being A Developer After 40
akosma
91
590k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
93
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Code Reviewing Like a Champion
maltzj
527
40k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
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