Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska...
Transcript of Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska...
![Page 1: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/1.jpg)
Scientific IT Services
Boosting Research with Machine Learning
Franziska OschmannScientific IT Services, ETH10th of July, 2019
![Page 2: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/2.jpg)
Examples for ML in research
![Page 3: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/3.jpg)
Examples for ML in research
Discovery and characterisation of new particles
https://home.cern/
![Page 4: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/4.jpg)
Examples for ML in research
Prediction of epileptic seizures
https://medicalxpress.com
![Page 5: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/5.jpg)
Examples for ML in research
Characterisation of cancer regions
https://camelyon16.grand-challenge.org
![Page 6: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/6.jpg)
Examples for ML in research
![Page 7: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/7.jpg)
Applications of ML in research:
• Uncover hidden patterns in data
• Automatisation of time-consuming processes
Examples for ML in research
![Page 8: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/8.jpg)
Examples for ML in research
Applications of ML in research:
• Uncover hidden patterns in data
• Automatisation of time-consuming processes
![Page 9: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/9.jpg)
How to apply ML in research?
![Page 10: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/10.jpg)
100010. . .
Prediction
Data
x
Y
Preprocessing Model
How to apply ML in research?
scipy
pandaskeras
scikit-learn
![Page 11: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/11.jpg)
from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score from my_helper import data, preprocess
## Load data X = data.data y = data.target
## Preprocessing of data X_proc = preprocess(X)
## Split into training and validation set X_train, X_val, y_train, y_val = train_test_split( X_stand, y, test_size=0.33)
## Model lr = LogisticRegression() lr.fit(X_train, y_train)
y_pred = lr.predict(X_val) print(accuracy_score(y_val, y_pred))
Data
Preprocessing
Model
Prediction
How to apply ML in research?
![Page 12: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/12.jpg)
Use case 1: EEG signal detection
![Page 13: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/13.jpg)
Luciw et al., Nature, 2014
Experimental setup Hand movement
Use case 1: Experimental setup
![Page 14: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/14.jpg)
RecordingRecording
Use case 1: Preprocessing
![Page 15: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/15.jpg)
RecordingRecording
Use case 1: Preprocessing
![Page 16: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/16.jpg)
Sliding windowRecording
Use case 1: Preprocessing
![Page 17: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/17.jpg)
Sliding windowRecording
Use case 1: Preprocessing
![Page 18: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/18.jpg)
Low-pass filterSliding window
Use case 1: Preprocessing
![Page 19: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/19.jpg)
Low-pass filter Power
Use case 1: Preprocessing
![Page 20: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/20.jpg)
Low-pass filter Average Power
Use case 1: Preprocessing
![Page 21: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/21.jpg)
lda = LDA() rf = RandomForestClassifier(class_weight = 'balanced') lr = LogisticRegression(class_weight = 'balanced')
eclf = VotingClassifier(estimators=[('lda', lda), ('rf', rf), ('lr', lr)], voting = 'soft', weights=[1,1,1])
eclf.fit(X_train, y_train) y_pred = eclf.predict(X_test)
Model
Prediction
Use case 1: Model
![Page 22: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/22.jpg)
• 70% of the events were correctly predicted
• hardly any false alarm
confusion matrixPredicted:
NoPredicted:
YesActual:
No 456263 113
Actual:Yes 3833 9016
Use case 1: Prediction
observed eventpredicted event
![Page 23: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/23.jpg)
confusion matrixPredicted:
NoPredicted:
YesActual:
No 456263 113
Actual:Yes 3833 9016
• 70% of the events were correctly predicted
• hardly any false alarm
Use case 1: Prediction
observed eventpredicted event
![Page 24: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/24.jpg)
Use case 1: Summary
Classic ML model provides:
• a reasonably good prediction
• deeper insight into data due to interpretable models
• computational low costs (training: ~30m on single CPU)
![Page 25: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/25.jpg)
Use case 2: Segmentation
![Page 26: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/26.jpg)
Raw image SegmentationAutomatic detection
Data acquired by: Graham Knott and Marco Cantoni at EPFL
Use case 2: Data
done by hand
?
![Page 27: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/27.jpg)
Input
Hidden layer 1
Hidden layer 2
Output
from keras.models import Model from keras.layers import Input, Dense
inp = Input(shape=(3,))
hidden_1 = Dense(4)(inp)
hidden_2 = Dense(4)(hidden_1)
outp = Dense(1)(hidden_2)
model = Model(inputs=inp, outputs=outp)
Neural Network Implementation
Use case 2: Model
![Page 28: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/28.jpg)
from my_models import unet
model = unet()
model.fit(X_train, y_train)
results = model.predict(X_test)
U-Net Implementation
Ronneberger et al, MICCAI 2015
Use case 2: Model
• Downstream branch: ‘what’-information
• Upstream branch: ‘where’-information
![Page 29: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/29.jpg)
Raw image Prediction
Use case 2: Prediction
Ground truth
![Page 30: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/30.jpg)
Use case 2: Summary
Deep learning model provides:
• automatisation of time-consuming process
• recognition of patterns in complex dataset
• no interpretability of model
• computationally heavy solution
(Training: ~2h runtime on single GPU/~2d on single CPU)
![Page 31: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/31.jpg)
Summary
Machine Learning in research:
• uncover hidden patterns in data
• interpretable models allow further insight
• automatisation of time-consuming processes
![Page 32: Boosting Research with Machine Learning - …...Boosting Research with Machine Learning Franziska Oschmann Scientific IT Services, ETH 10th of July, 2019 Examples for ML in research](https://reader035.fdocuments.net/reader035/viewer/2022070918/5fb837ca94c7684afa7c3aba/html5/thumbnails/32.jpg)
Thank you for your
attention!