SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
Machine learning for functional connectomes
Gaël Varoquaux
Machine learning for functional connectomes
Gaël Varoquaux
Outline:
1 Intuitions on machine learning
2 Machine learning on rest fMRI
Pointers to code in nilearn & scikit-learn
nilearn.github.io — scikit-learn.org
Use the “API reference” to look up functions
and scroll down for examples of usage
1 Intuitions on machine learning
Adjusting models for prediction
G Varoquaux 2
1 Machine learning in a nutshell: an example
Face recognition
Andrew Bill Charles Dave
G Varoquaux 3
1 Machine learning in a nutshell: an example
Face recognition
Andrew Bill Charles Dave
?G Varoquaux 3
1 Machine learning in a nutshell
A simple method:
1 Store all the known (noisy) images and the names
that go with them.
2 From a new (noisy) images, find the image that is
most similar.
“Nearest neighbor” method
G Varoquaux 4
1 Machine learning in a nutshell
A simple method:
1 Store all the known (noisy) images and the names
that go with them.
2 From a new (noisy) images, find the image that is
most similar.
“Nearest neighbor” method
How many errors on already-known images?
... 0: no errors
Test data = Train data
G Varoquaux 4
1 Machine learning in a nutshell
A simple method:
1 Store all the known (noisy) images and the names
that go with them.
2 From a new (noisy) images, find the image that is
most similar.
“Nearest neighbor” method
How many errors on already-known images?
... 0: no errors
Test data = Train data
G Varoquaux 4
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
G Varoquaux 5
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
x
y
Which model to prefer?
G Varoquaux 5
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
x
y
Problem of “over-fitting”
Minimizing error is not always the best strategy
(learning noise)
Test data = train data
G Varoquaux 5
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
x
y
Prefer simple models
= concept of “regularization”
Balance the number of parameters to learn
with the amount of data
G Varoquaux 5
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
Two descriptors:
2 dimensions
X_1
X_2
y
The higher the number of descriptors
the more the trouble
G Varoquaux 5
1 Machine learning in a nutshell: intuitions
A single descriptor:
one dimension
x
y
Two descriptors:
2 dimensions
X_1
X_2
y
The higher the number of descriptors
the more the trouble
The higher the required number of subjects
G Varoquaux 5
1 Testing prediction: generalization and cross-validation
[Varoquaux... 2017]
x
y
x
y
G Varoquaux 6
1 Testing prediction: generalization and cross-validation
[Varoquaux... 2017]
x
y
x
y
⇒ Need test on independent, unseen data
Train set Validation
set
Measures prediction accuracy
sklearn.model_selection.train_test_split
G Varoquaux 6
1 Testing prediction: generalization and cross-validation
[Varoquaux... 2017]
x
y
x
y
⇒ Need test on independent, unseen data
Loop
Test setTrain set
Full data
sklearn.
model_selection.
cross_val_score
G Varoquaux 6
2 Machine learning on rest
fMRI
for population imaging
finding differences between subjects
in functional connectomesG Varoquaux 7
From rest-fMRI to biomarkers
No salient features in rest fMRI
G Varoquaux 8
From rest-fMRI to biomarkers
Define functional regions
G Varoquaux 8
From rest-fMRI to biomarkers
Define functional regions
Learn interactions
G Varoquaux 8
From rest-fMRI to biomarkers
Define functional regions
Learn interactions
Find differences
G Varoquaux 8
From rest-fMRI to biomarkers
Functional
connectivity
matrix
Time series
extraction
Region
definition
Supervised learning
RS-fMRI
Typical pipeline [Varoquaux and Craddock 2013]
1. Define regions
2. Extract times series
3. Build functional-connectivity matrix
4. Apply supervised machine learning
G Varoquaux 9
2 Defining regions from rest-fMRI
Clustering nilearn.regions.Parcellations
k-means
Fast (in nilearn)
No spatial model
⇒ smooth the data
G Varoquaux 10
2 Defining regions from rest-fMRI
Clustering nilearn.regions.Parcellations
k-means
Fast (in nilearn)
No spatial model
⇒ smooth the data
Ward agglomerative clustering
Recursive merges of clusters
Spatial model constraints merges
⇒ fast
... ... ...
... ...
G Varoquaux 10
2 Defining regions from rest-fMRI
Clustering nilearn.regions.Parcellations
k-means
Fast (in nilearn)
No spatial model
⇒ smooth the data
Ward agglomerative clustering
Recursive merges of clusters
Spatial model constraints merges
⇒ fast
Decomposition models
time
voxels
time
voxels
time
voxels
Y +E · S=
25
N
G Varoquaux 10
2 Defining regions from rest-fMRI
Clustering nilearn.regions.Parcellations
k-means
Fast (in nilearn)
No spatial model
⇒ smooth the data
Ward agglomerative clustering
Recursive merges of clusters
Spatial model constraints merges
⇒ fast
Decomposition models
ICA: nilearn.decomposition.CanICA
seek independence of maps
Sparse dictionary learning:
seek sparse maps
nilearn.decomposition.DictLearning
G Varoquaux 10
2 For connectome prediction [Dadi... 2018]
RS-fMRI
Functional
connectivity
Time series
2
4
3
1
Diagnosis
ROIs
Choice of regions for best prediction?
G Varoquaux 11
2 For connectome prediction [Dadi... 2018]
RS-fMRI
Functional
connectivity
Time series
2
4
3
1
Diagnosis
ROIs
Choice of regions for best prediction?
G Varoquaux 11
2 Region definition: resulting parcellations
Dictionary learning Group ICA
Ward clustering K-Means clustering
2 Region definition: resulting parcellations
Dictionary learning Group ICA
Ward clustering K-Means clustering
2 Region definition: resulting parcellations
Dictionary learning Group ICA
Ward clustering K-Means clustering
2 Time-series extraction
Extract ROI-average signal:
Optional low-pass filter
(≈ .1 Hz – .3 Hz)
Regress out confounds (movement parameters, CSF &
white matter signals, Compcorr, Global mean)
Hard parcellations (eg from clustering)
nilearn.input_data.NiftiLabelsMasker
Soft parcellations (eg from ICA)
nilearn.input_data.NiftiMapsMasker
G Varoquaux 13
2 Connectome: building a connectivity matrix
How to capture and represent interactions?
G Varoquaux 14
2 Connectome: differences across subjects
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
Correlation matrices
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
0 5 10 15 20 25
0
5
10
15
20
25
Partial correlation matrices
3 controls, 1 severe stroke patient
Which is which?
G Varoquaux 15
2 Connectome: differences across subjects
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25Large lesion
Correlation matrices
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25Large lesion
Partial correlation matrices
Spread-out variability in correlation matrices
Noise in partial-correlations
Strong dependence between coefficients
[Varoquaux... 2010]
G Varoquaux 15
2 Information geometry: uniform-error parametrization
Subject-specific noise in covariance form manifold
Tangent space removes coupling in coefficients
Controls
Patient
dΣ
M
anifold
Tangent
Tangent embedding[Varoquaux... 2010]
G Varoquaux 16
2 Connectome: which parametrization maps differences?
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25Large lesion
Correlation matrices
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25Large lesion
Partial correlation matrices
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25 Control
0 5 10 15 20 25
0
5
10
15
20
25Large lesion
Tangent-space embedding
[varoquaux 2010]
G Varoquaux 17
2 For connectome prediction [Dadi... 2018]
Time series
2
RS-fMRI
41
Diagnosis
ROIs Functional
connectivity
3
Connectivity matrix
Correlation nilearn.connectome.ConnectivityMeasure
Partial correlations
Tangent space
G Varoquaux 18
2 For connectome prediction [Dadi... 2018]
Time series
2
RS-fMRI
41
Diagnosis
ROIs Functional
connectivity
3
Connectivity matrix
Correlation nilearn.connectome.ConnectivityMeasure
Partial correlations
Tangent space
G Varoquaux 18
2 Supervised learning step [Dadi... 2018]
Functional
connectivity
Time series
3
4
Diagnosis
2
RS-fMRI
1 ROIs
Supervised learning
Stick with Linear models
sklearn.linear_model.LogisticRegression
G Varoquaux 19
2 Supervised learning step [Dadi... 2018]
Functional
connectivity
Time series
3
4
Diagnosis
2
RS-fMRI
1 ROIs
Supervised learning
Stick with Linear models
sklearn.linear_model.LogisticRegression
G Varoquaux 19
Predicting from brain activity at rest
RS-fMRI
Functional
connectivity
Time series
2
4
3
1
Diagnosis
ROIs
1. Functional regions (eg clustering, decomposition, or BASC atlas)
2. Filtering and or confound removal
3. Tangent-space parametrization
4. Supervised linear models (eg SVMs)
G Varoquaux 20
3 References I
A. Abraham, E. Dohmatob, B. Thirion, D. Samaras, and
G. Varoquaux. Extracting brain regions from rest fMRI with
total-variation constrained dictionary learning. In MICCAI, page
607. 2013.
K. Dadi, M. Rahim, A. Abraham, D. Chyzhyk, M. Milham,
B. Thirion, and G. Varoquaux. Benchmarking functional
connectome-based predictive models for resting-state fmri. 2018.
G. Varoquaux and R. C. Craddock. Learning and comparing
functional connectomes across subjects. NeuroImage, 80:405,
2013.
G. Varoquaux and B. Thirion. How machine learning is shaping
cognitive neuroimaging. GigaScience, 3:28, 2014.
G. Varoquaux, F. Baronnet, A. Kleinschmidt, P. Fillard, and
B. Thirion. Detection of brain functional-connectivity difference
in post-stroke patients using group-level covariance modeling. In
MICCAI. 2010.G Varoquaux 21
3 References II
G. Varoquaux, P. R. Raamana, D. A. Engemann, A. Hoyos-Idrobo,
Y. Schwartz, and B. Thirion. Assessing and tuning brain
decoders: cross-validation, caveats, and guidelines. NeuroImage,
145:166–179, 2017.
G Varoquaux 22

Contenu connexe

Tendances

Tendances (20)

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
 
Bayesian Deep Learning
Bayesian Deep LearningBayesian Deep Learning
Bayesian Deep Learning
 
Uncertainty in Deep Learning
Uncertainty in Deep LearningUncertainty in Deep Learning
Uncertainty in Deep Learning
 
Uncertainty Modeling in Deep Learning
Uncertainty Modeling in Deep LearningUncertainty Modeling in Deep Learning
Uncertainty Modeling in Deep Learning
 
Modeling uncertainty in deep learning
Modeling uncertainty in deep learning Modeling uncertainty in deep learning
Modeling uncertainty in deep learning
 
Graph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype PredictionGraph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype Prediction
 
Performance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use casePerformance evaluation of GANs in a semisupervised OCR use case
Performance evaluation of GANs in a semisupervised OCR use case
 
Large Scale Recommendation: a view from the Trenches
Large Scale Recommendation: a view from the TrenchesLarge Scale Recommendation: a view from the Trenches
Large Scale Recommendation: a view from the Trenches
 
Selective inference and single-cell differential analysis
Selective inference and single-cell differential analysisSelective inference and single-cell differential analysis
Selective inference and single-cell differential analysis
 
2018.01.12 AHClab SD-study paper reading
2018.01.12 AHClab SD-study paper reading2018.01.12 AHClab SD-study paper reading
2018.01.12 AHClab SD-study paper reading
 
Fast relaxation methods for the matrix exponential
Fast relaxation methods for the matrix exponential Fast relaxation methods for the matrix exponential
Fast relaxation methods for the matrix exponential
 
How to calculate back propagation
How to calculate back propagationHow to calculate back propagation
How to calculate back propagation
 
Joint causal inference on observational and experimental data - NIPS 2016 "Wh...
Joint causal inference on observational and experimental data - NIPS 2016 "Wh...Joint causal inference on observational and experimental data - NIPS 2016 "Wh...
Joint causal inference on observational and experimental data - NIPS 2016 "Wh...
 
Talk: Joint causal inference on observational and experimental data - NIPS 20...
Talk: Joint causal inference on observational and experimental data - NIPS 20...Talk: Joint causal inference on observational and experimental data - NIPS 20...
Talk: Joint causal inference on observational and experimental data - NIPS 20...
 
Anti-differentiating Approximation Algorithms: PageRank and MinCut
Anti-differentiating Approximation Algorithms: PageRank and MinCutAnti-differentiating Approximation Algorithms: PageRank and MinCut
Anti-differentiating Approximation Algorithms: PageRank and MinCut
 
Pattern-based classification of demographic sequences
Pattern-based classification of demographic sequencesPattern-based classification of demographic sequences
Pattern-based classification of demographic sequences
 
Localized methods for diffusions in large graphs
Localized methods for diffusions in large graphsLocalized methods for diffusions in large graphs
Localized methods for diffusions in large graphs
 
CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)
 
La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...La statistique et le machine learning pour l'intégration de données de la bio...
La statistique et le machine learning pour l'intégration de données de la bio...
 
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
Naive Bayes Classifier Tutorial | Naive Bayes Classifier Example | Naive Baye...
 

Similaire à Machine learning for functional connectomes

Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Sangmin Park
 
2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
Paulo Faria
 
DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
   DARMDN: Deep autoregressive mixture density nets for dynamical system mode...   DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
Balázs Kégl
 
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
MLconf
 

Similaire à Machine learning for functional connectomes (20)

Simple big data, in Python
Simple big data, in PythonSimple big data, in Python
Simple big data, in Python
 
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
 
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
 
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...
 
SVD and the Netflix Dataset
SVD and the Netflix DatasetSVD and the Netflix Dataset
SVD and the Netflix Dataset
 
Multimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-AnsweringMultimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-Answering
 
Overlap Layout Consensus assembly
Overlap Layout Consensus assemblyOverlap Layout Consensus assembly
Overlap Layout Consensus assembly
 
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
Griffin: Grouping Suspicious Memory-Access Patterns to Improve Understanding...
 
Static Analysis and Verification of C Programs
Static Analysis and Verification of C ProgramsStatic Analysis and Verification of C Programs
Static Analysis and Verification of C Programs
 
My presentation at University of Nottingham "Fast low-rank methods for solvin...
My presentation at University of Nottingham "Fast low-rank methods for solvin...My presentation at University of Nottingham "Fast low-rank methods for solvin...
My presentation at University of Nottingham "Fast low-rank methods for solvin...
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
 
2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria2014-mo444-practical-assignment-04-paulo_faria
2014-mo444-practical-assignment-04-paulo_faria
 
DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
   DARMDN: Deep autoregressive mixture density nets for dynamical system mode...   DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
DARMDN: Deep autoregressive mixture density nets for dynamical system mode...
 
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
 
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
 
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
 
Taller parcial 2
Taller parcial 2Taller parcial 2
Taller parcial 2
 
Co-Learning: Consensus-based Learning for Multi-Agent Systems
 Co-Learning: Consensus-based Learning for Multi-Agent Systems Co-Learning: Consensus-based Learning for Multi-Agent Systems
Co-Learning: Consensus-based Learning for Multi-Agent Systems
 
A Cooperative Coevolutionary Approach to Maximise Surveillance Coverage of UA...
A Cooperative Coevolutionary Approach to Maximise Surveillance Coverage of UA...A Cooperative Coevolutionary Approach to Maximise Surveillance Coverage of UA...
A Cooperative Coevolutionary Approach to Maximise Surveillance Coverage of UA...
 
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
 

Plus de 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
 

Plus de Gael Varoquaux (17)

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
 
Representation learning in limited-data settings
Representation learning in limited-data settingsRepresentation learning in limited-data settings
Representation learning in limited-data settings
 
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
 
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
 
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
 
On the code of data science
On the code of data scienceOn the code of data science
On the code of data science
 
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
 
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
 
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
 
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
 
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...
 
Open Source Scientific Software
Open Source Scientific SoftwareOpen Source Scientific Software
Open Source Scientific Software
 
Scikit learn: apprentissage statistique en Python
Scikit learn: apprentissage statistique en PythonScikit learn: apprentissage statistique en Python
Scikit learn: apprentissage statistique en Python
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Machine learning for functional connectomes

  • 1. Machine learning for functional connectomes Gaël Varoquaux
  • 2. Machine learning for functional connectomes Gaël Varoquaux Outline: 1 Intuitions on machine learning 2 Machine learning on rest fMRI Pointers to code in nilearn & scikit-learn nilearn.github.io — scikit-learn.org Use the “API reference” to look up functions and scroll down for examples of usage
  • 3. 1 Intuitions on machine learning Adjusting models for prediction G Varoquaux 2
  • 4. 1 Machine learning in a nutshell: an example Face recognition Andrew Bill Charles Dave G Varoquaux 3
  • 5. 1 Machine learning in a nutshell: an example Face recognition Andrew Bill Charles Dave ?G Varoquaux 3
  • 6. 1 Machine learning in a nutshell A simple method: 1 Store all the known (noisy) images and the names that go with them. 2 From a new (noisy) images, find the image that is most similar. “Nearest neighbor” method G Varoquaux 4
  • 7. 1 Machine learning in a nutshell A simple method: 1 Store all the known (noisy) images and the names that go with them. 2 From a new (noisy) images, find the image that is most similar. “Nearest neighbor” method How many errors on already-known images? ... 0: no errors Test data = Train data G Varoquaux 4
  • 8. 1 Machine learning in a nutshell A simple method: 1 Store all the known (noisy) images and the names that go with them. 2 From a new (noisy) images, find the image that is most similar. “Nearest neighbor” method How many errors on already-known images? ... 0: no errors Test data = Train data G Varoquaux 4
  • 9. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y G Varoquaux 5
  • 10. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y x y Which model to prefer? G Varoquaux 5
  • 11. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y x y Problem of “over-fitting” Minimizing error is not always the best strategy (learning noise) Test data = train data G Varoquaux 5
  • 12. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y x y Prefer simple models = concept of “regularization” Balance the number of parameters to learn with the amount of data G Varoquaux 5
  • 13. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y Two descriptors: 2 dimensions X_1 X_2 y The higher the number of descriptors the more the trouble G Varoquaux 5
  • 14. 1 Machine learning in a nutshell: intuitions A single descriptor: one dimension x y Two descriptors: 2 dimensions X_1 X_2 y The higher the number of descriptors the more the trouble The higher the required number of subjects G Varoquaux 5
  • 15. 1 Testing prediction: generalization and cross-validation [Varoquaux... 2017] x y x y G Varoquaux 6
  • 16. 1 Testing prediction: generalization and cross-validation [Varoquaux... 2017] x y x y ⇒ Need test on independent, unseen data Train set Validation set Measures prediction accuracy sklearn.model_selection.train_test_split G Varoquaux 6
  • 17. 1 Testing prediction: generalization and cross-validation [Varoquaux... 2017] x y x y ⇒ Need test on independent, unseen data Loop Test setTrain set Full data sklearn. model_selection. cross_val_score G Varoquaux 6
  • 18. 2 Machine learning on rest fMRI for population imaging finding differences between subjects in functional connectomesG Varoquaux 7
  • 19. From rest-fMRI to biomarkers No salient features in rest fMRI G Varoquaux 8
  • 20. From rest-fMRI to biomarkers Define functional regions G Varoquaux 8
  • 21. From rest-fMRI to biomarkers Define functional regions Learn interactions G Varoquaux 8
  • 22. From rest-fMRI to biomarkers Define functional regions Learn interactions Find differences G Varoquaux 8
  • 23. From rest-fMRI to biomarkers Functional connectivity matrix Time series extraction Region definition Supervised learning RS-fMRI Typical pipeline [Varoquaux and Craddock 2013] 1. Define regions 2. Extract times series 3. Build functional-connectivity matrix 4. Apply supervised machine learning G Varoquaux 9
  • 24. 2 Defining regions from rest-fMRI Clustering nilearn.regions.Parcellations k-means Fast (in nilearn) No spatial model ⇒ smooth the data G Varoquaux 10
  • 25. 2 Defining regions from rest-fMRI Clustering nilearn.regions.Parcellations k-means Fast (in nilearn) No spatial model ⇒ smooth the data Ward agglomerative clustering Recursive merges of clusters Spatial model constraints merges ⇒ fast ... ... ... ... ... G Varoquaux 10
  • 26. 2 Defining regions from rest-fMRI Clustering nilearn.regions.Parcellations k-means Fast (in nilearn) No spatial model ⇒ smooth the data Ward agglomerative clustering Recursive merges of clusters Spatial model constraints merges ⇒ fast Decomposition models time voxels time voxels time voxels Y +E · S= 25 N G Varoquaux 10
  • 27. 2 Defining regions from rest-fMRI Clustering nilearn.regions.Parcellations k-means Fast (in nilearn) No spatial model ⇒ smooth the data Ward agglomerative clustering Recursive merges of clusters Spatial model constraints merges ⇒ fast Decomposition models ICA: nilearn.decomposition.CanICA seek independence of maps Sparse dictionary learning: seek sparse maps nilearn.decomposition.DictLearning G Varoquaux 10
  • 28. 2 For connectome prediction [Dadi... 2018] RS-fMRI Functional connectivity Time series 2 4 3 1 Diagnosis ROIs Choice of regions for best prediction? G Varoquaux 11
  • 29. 2 For connectome prediction [Dadi... 2018] RS-fMRI Functional connectivity Time series 2 4 3 1 Diagnosis ROIs Choice of regions for best prediction? G Varoquaux 11
  • 30. 2 Region definition: resulting parcellations Dictionary learning Group ICA Ward clustering K-Means clustering
  • 31. 2 Region definition: resulting parcellations Dictionary learning Group ICA Ward clustering K-Means clustering
  • 32. 2 Region definition: resulting parcellations Dictionary learning Group ICA Ward clustering K-Means clustering
  • 33. 2 Time-series extraction Extract ROI-average signal: Optional low-pass filter (≈ .1 Hz – .3 Hz) Regress out confounds (movement parameters, CSF & white matter signals, Compcorr, Global mean) Hard parcellations (eg from clustering) nilearn.input_data.NiftiLabelsMasker Soft parcellations (eg from ICA) nilearn.input_data.NiftiMapsMasker G Varoquaux 13
  • 34. 2 Connectome: building a connectivity matrix How to capture and represent interactions? G Varoquaux 14
  • 35. 2 Connectome: differences across subjects 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 Correlation matrices 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 0 5 10 15 20 25 Partial correlation matrices 3 controls, 1 severe stroke patient Which is which? G Varoquaux 15
  • 36. 2 Connectome: differences across subjects 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25Large lesion Correlation matrices 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25Large lesion Partial correlation matrices Spread-out variability in correlation matrices Noise in partial-correlations Strong dependence between coefficients [Varoquaux... 2010] G Varoquaux 15
  • 37. 2 Information geometry: uniform-error parametrization Subject-specific noise in covariance form manifold Tangent space removes coupling in coefficients Controls Patient dΣ M anifold Tangent Tangent embedding[Varoquaux... 2010] G Varoquaux 16
  • 38. 2 Connectome: which parametrization maps differences? 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25Large lesion Correlation matrices 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25Large lesion Partial correlation matrices 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25 Control 0 5 10 15 20 25 0 5 10 15 20 25Large lesion Tangent-space embedding [varoquaux 2010] G Varoquaux 17
  • 39. 2 For connectome prediction [Dadi... 2018] Time series 2 RS-fMRI 41 Diagnosis ROIs Functional connectivity 3 Connectivity matrix Correlation nilearn.connectome.ConnectivityMeasure Partial correlations Tangent space G Varoquaux 18
  • 40. 2 For connectome prediction [Dadi... 2018] Time series 2 RS-fMRI 41 Diagnosis ROIs Functional connectivity 3 Connectivity matrix Correlation nilearn.connectome.ConnectivityMeasure Partial correlations Tangent space G Varoquaux 18
  • 41. 2 Supervised learning step [Dadi... 2018] Functional connectivity Time series 3 4 Diagnosis 2 RS-fMRI 1 ROIs Supervised learning Stick with Linear models sklearn.linear_model.LogisticRegression G Varoquaux 19
  • 42. 2 Supervised learning step [Dadi... 2018] Functional connectivity Time series 3 4 Diagnosis 2 RS-fMRI 1 ROIs Supervised learning Stick with Linear models sklearn.linear_model.LogisticRegression G Varoquaux 19
  • 43. Predicting from brain activity at rest RS-fMRI Functional connectivity Time series 2 4 3 1 Diagnosis ROIs 1. Functional regions (eg clustering, decomposition, or BASC atlas) 2. Filtering and or confound removal 3. Tangent-space parametrization 4. Supervised linear models (eg SVMs) G Varoquaux 20
  • 44. 3 References I A. Abraham, E. Dohmatob, B. Thirion, D. Samaras, and G. Varoquaux. Extracting brain regions from rest fMRI with total-variation constrained dictionary learning. In MICCAI, page 607. 2013. K. Dadi, M. Rahim, A. Abraham, D. Chyzhyk, M. Milham, B. Thirion, and G. Varoquaux. Benchmarking functional connectome-based predictive models for resting-state fmri. 2018. G. Varoquaux and R. C. Craddock. Learning and comparing functional connectomes across subjects. NeuroImage, 80:405, 2013. G. Varoquaux and B. Thirion. How machine learning is shaping cognitive neuroimaging. GigaScience, 3:28, 2014. G. Varoquaux, F. Baronnet, A. Kleinschmidt, P. Fillard, and B. Thirion. Detection of brain functional-connectivity difference in post-stroke patients using group-level covariance modeling. In MICCAI. 2010.G Varoquaux 21
  • 45. 3 References II G. Varoquaux, P. R. Raamana, D. A. Engemann, A. Hoyos-Idrobo, Y. Schwartz, and B. Thirion. Assessing and tuning brain decoders: cross-validation, caveats, and guidelines. NeuroImage, 145:166–179, 2017. G Varoquaux 22