Pattern Recognition for Neuroimaging Toolbox: PRoNTo · •PRoNTo’sgoals and history •PRoNTo...
Transcript of Pattern Recognition for Neuroimaging Toolbox: PRoNTo · •PRoNTo’sgoals and history •PRoNTo...
-
Click to edit Master title style
Pattern Recognition for Neuroimaging Toolbox: PRoNTo
Jessica Schrouff
PRNI 2018
June 14th
NUS, Singapore
-
Click to edit Master title styleOutline
• PRoNTo’s goals and history
• PRoNTo for users General framework
Modules
• PRoNTo for developers Implementation
Scripting examples
• PRoNTo v3
• Hands-on session with Fabio Ferreira
6/14/2018 J. Schrouff - PRNI 2018 2
-
Click to edit Master title styleAims
6/14/2018 J. Schrouff - PRNI 2018 3
PRoNToMachine Learning
communityNeuroscience and
Clinical Neuroscience communities
sMRI
fMRI
-
Click to edit Master title stylePRoNTo’s history
• Pascal Harvest project: August 2011, v1.0
• Team from different backgrounds and institutions
• Releases since: v1.1, v2.0, v2.1, v3.0 to come
6/14/2018 J. Schrouff - PRNI 2018 4
-
Click to edit Master title stylePRoNTo features
• Matlab based
• Open-source
• Interfaced: GUI and batch
• SPM compatible
• Multiple classification and regression algorithms
• Includes developments from the team member’s work
Available at: http://www.mlnl.cs.ucl.ac.uk/pronto/
6/14/2018 J. Schrouff - PRNI 2018 5
http://www.mlnl.cs.ucl.ac.uk/pronto/
-
Click to edit Master title styleQuestions it addresses
• Classification Can we use brain scans to diagnose psychiatric or neurological disorders?
Can we decode from the brain scans information about the stimuli being processed?
• Regression Can we predict clinical scores from brain scans?
6/14/2018 J. Schrouff - PRNI 2018 6
-
Click to edit Master title style
PRoNTo for users
Jessica Schrouff
PRNI 2018
June 14th
NUS, Singapore
-
Click to edit Master title styleFramework
6/14/2018 J. Schrouff - PRNI 2018 8
WeightsRun modelSpecify model
Feature set
Data & Design
• Groups• Subjects/scans• Modalities• Conditions
• Extract features• Build kernel(s)• Detrend• Scaling
• Targets/classes• Cross-Validation• Hyper-parameter
optimization• Machines • Data operations
• Estimate model• Assess performance• Assess significance
• Feature weights• Kernel contribution
DataDesign1st level mask
Atlas2nd level mask (ROI)
PRT.mat
Review Design Review Kernel Display performance Display weightsReview Model, CV
-
Click to edit Master title styleData & Design
• User inputs:
Groups
Subjects
Modalities
Design
Covariates
Targets
Masks
6/14/2018 J. Schrouff - PRNI 2018 9
PRT.mat
Data & Design
DataDesign1st level mask
Review Design
-
Click to edit Master title styleFeature set
• Reads through all images in modality
• Selects features for kernel(s)
• v2: combines kernels
6/14/2018 J. Schrouff - PRNI 2018 10
Feature set
Atlas2nd level mask (ROI)
Review Kernel
-
Click to edit Master title styleSpecify model
• Define the question:
feature set
classes / samples
machine and parameters
cross-validation (inner & outer)
data operations
6/14/2018 J. Schrouff - PRNI 2018 11
Specify model
Review Model, CV
-
Click to edit Master title styleMachines
• Classification:
SVM (LIBSVM)
Gaussian Processes (GPML)
L1-MKL (simpleMKL)
• Regression:
RVR
KRR
Gaussian Processes (GPML)
L1-MKL (simpleMKL)
6/14/2018 J. Schrouff - PRNI 2018 12
-
Click to edit Master title style
4/14/2018 J. Schrouff - Course 2018 13
Standard approaches:• LOSO• LOBO• LORO• LOSCO• k-fold CV
Cross-validation
Flexible CV schemes allowed
-
Click to edit Master title styleRun model
• Estimates the model
• Batch: runs permutations
6/14/2018 J. Schrouff - PRNI 2018 14
Run model
Display performance
Measuresofperformanceforregression
Correla*on
Coefficientofdetermina*on
MeanSquaredError(MSE)
NormalisedMSE
-
Click to edit Master title styleCompute weights
• Build voxel weights
• Maps back to original image
• ROI contributions:
average from atlas (post-hoc)
kernel contribution (MKL)
6/14/2018 J. Schrouff - PRNI 2018 15
-
Click to edit Master title styleThank you!
Questions?
6/14/2018 J. Schrouff - PRNI 2018 16
-
Click to edit Master title style
PRoNTo for developers
Jessica Schrouff
PRNI 2018
June 14th
NUS, Singapore
-
Click to edit Master title stylePRoNTo for developers
• Tool box: use PRoNTo as a basis for developments
• Avoids to re-code e.g. cross-validation when new data/model
• Established framework: less prone to errors, double dipping
6/14/2018 J. Schrouff - PRNI 2018 18
-
Click to edit Master title stylePRoNTo architecture
• Modular
• User interfaces
• Core functions
• All written in Matlab with occasional mex interfaces
6/14/2018 J. Schrouff - PRNI 2018 19
WeightsRun model
Specify model
Feature set
Data & Design
-
Click to edit Master title stylePRoNTo architecture
6/14/2018 J. Schrouff - PRNI 2018 20
GUI Batch
Core functions
-
Click to edit Master title stylePRT structure
• Similar to SPM structure
• Saved in folder as ‘PRT.mat’
• PRT has one or 2 fields per module
• Load and dig:
6/14/2018 J. Schrouff - PRNI 2018 21
-
Click to edit Master title styleCore functions
• One function per module
• Ideal for scripting:
• Not for Data & Design step
• Best for running models
6/14/2018 J. Schrouff - PRNI 2018 22
-
Click to edit Master title styleScripting example - 1
• Simulated data: one feature set per SNR and sparsity
• 19 * 15 = 285 models
• Power using PRoNTo:Home script
Batch to create feature set
Load PRT
Use a pre-defined model as basis
Replace the feature set
Run and extract performance
6/14/2018 J. Schrouff - PRNI 2018 23
-
Click to edit Master title styleScripting example - 2
• Permutations can be lengthy
• Can run code on cluster
• Different strategies: one job per xx permutations
using parfor
spmd
Batch or prt_permutations
Careful with graphical/workspace output
6/14/2018 J. Schrouff - PRNI 2018 24
-
Click to edit Master title stylePRoNTo machines
• PRoNTo interfaces libraries
6/14/2018 J. Schrouff - PRNI 2018 25
Wrapper functions Third-party libraries
-
Click to edit Master title styleNew machine
• Can interface your classification/regression algorithm
6/14/2018 J. Schrouff - PRNI 2018 26
esvr_train.mesvr_predict.m
Re-arrange inputs/outputs and arguments
-
Click to edit Master title styleNew machine: further considerations
• labels: 1 for class 1, 2 for class 2, …
• Hyper-parameter optimization: careful with string arguments
• Use ‘custom machine’
• Compiled machine?
• Weight computation: Default: linear kernel
If not: need to specify weight function
6/14/2018 J. Schrouff - PRNI 2018 27
-
Click to edit Master title styleContributing
• Yes!
• Next releases in Github
• Need to interface: GUI and batch
• Backwards compatibility
• Matlab backwards compatibility and toolbox codes
• Coming soon: developer’s manual
6/14/2018 J. Schrouff - PRNI 2018 28
-
Click to edit Master title styleThank you!
Questions?
6/14/2018 J. Schrouff - PRNI 2018 29
-
Click to edit Master title style
PRoNTo v3.0
Jessica Schrouff
PRNI 2018
June 14th
NUS, Singapore
-
Click to edit Master title styleNew input formats
• SPM MEEG
6/14/2018 J. Schrouff - PRNI 2018 31
-
Click to edit Master title styleNew input formats
• .mat
6/14/2018 J. Schrouff - PRNI 2018 32
-
Click to edit Master title styleNew functionalities
• Non-kernel methods
• Combining different data formats (e.g. EEG and fMRI)
• Multi-Task Learning
• Test model module: share PRT and weight maps
• and much more …
6/14/2018 J. Schrouff - PRNI 2018 33
-
Click to edit Master title styleThank you!
Suggestions?
6/14/2018 J. Schrouff - PRNI 2018 34
-
Click to edit Master title style
Hands-on session
Jessica Schrouff
PRNI 2018
June 14th
NUS, Singapore
-
Click to edit Master title styleDemo
• OASIS data set
• 50 demented – 50 non-demented
• Confounds: age and gender (boolean)
• Two features extracted: grey and white matter
• Goal: classify demented from non-demented
6/14/2018 J. Schrouff - PRNI 2018 36