forked from ASPteaching/stats-ml-4metabolomics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
4.1b-Example_classifiers.Rmd
214 lines (141 loc) · 5.33 KB
/
4.1b-Example_classifiers.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
---
title: 'Predictive Modeling for Metabolomics Data'
subtitle: 'Illustrative Example'
author: Alex Sanchez-Pla
institute: "Genetics, Microbiology & Statistics Department <br> Universitat de Barcelona"
date: "`r Sys.Date()`"
output:
xaringan::moon_reader:
css: [default, metropolis, metropolis-fonts, "mycss.css"]
lib_dir: libs
nature:
ratio: '16:9'
highlightStyle: github
highlightLines: true
countIncrementalSlides: true
editor_options:
chunk_output_type: console
---
<style type="text/css">
.remark-slide-content {
font-size: 22px;
padding: 1em 4em 1em 4em;
}
.left-code {
color: #777;
width: 38%;
height: 92%;
float: left;
}
.right-plot {
width: 60%;
float: right;
padding-left: 1%;
}
</style>
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE, echo=FALSE,
message=FALSE,warning=FALSE,
fig.dim=c(4.8, 4.5), fig.retina=2, out.width="100%")
knitr::opts_chunk$set(echo = FALSE)
knitr::knit_hooks$set(mysize = function(before, options, envir) {
if (before)
return(options$size)
})
```
# Outline
.columnwide[
### 1) [An Illustrative Example](#Example)
### 2) [References and Resources](#Resources)
]
---
class: inverse, middle, center
name: Example
# An Illustrative Example
---
# Data (1)
- LC-MS metabolomics dataset from [www.metabolomicsworkbench.org](https://www.metabolomicsworkbench.org) (Project ID: PR00038)
- Plasma from 131 subjects was collected from the Chronic Obstructive Pulmonary Disease Gene study (COPDGene) study cohort and analyzed using untargeted LC-MS (C18+ and HILIC+) metabolomics.
- Data were annotated, normalized and preprocessed using the methods described in:
- Cruickshank-Quinn CI, Jacobson S, Hughes G, Powell RL, Petrache I, Kechris K, Bowler R, Reisdorph N (2018) Metabolomics and transcriptomics pathway approach reveals outcome-specific perturbations in COPD. Sci Rep 8(1):17132
- Regan EA, Hokanson JE, Murphy JR, Make B, Lynch DA, Beaty TH, Curran-Everett D, Silverman EK, Crapo JD (2010) Genetic epidemiology of COPD (COPDGene) study design. COPD 7(1):32–43. [https://doi.org/10.3109/15412550903499522](https://doi.org/10.3109/15412550903499522)
---
# Data (2)
- COPD is an extremely heterogeneous disease comprising **multiple phenotypes**.
- The **131 subjects** were either current or former smokers with various chronic obstructive pulmonary disease (COPD) phenotypes including airflow obstruction, radiologic emphysema, and exacerbations.
- Within this set there were **56 males and 75 females**.
- **2999 metabolites**
---
# Training and test sets
- **70% training** (93 samples)
Fivefold CV: 5 different subsets (or fivefolds)
- 4 fold for training
- 1 fold as holdout-test dataset
The algorithms were trained against each of the folds.
The metrics were computed (average over fivefolds) for the training dataset.
- **30% test** (38 samples)
The test dataset was used to provide an **unbiased evaluation** of the best model fit on the training dataset.
For **model validation**, the performance of the test data was predicted using the trained models for three classifiers.
---
# Implementing the predictive models
- Different predictive models were implemented based on the training dataset using:
- metabolite abundances as the **predictor variables**
- Gender (Male/Female) as the **response**
- Then, the **Variable Importance Score**, which is a measure of feature relevance to gender for each metabolite was computed.
---
# Feature Ranking and Variable Importance
.pull-left[
**Metabolite relevant feature ranking bar plots** (top five metabolites) using **Variable Important Scores** ranging from 0 to 100.
(a) Random Forest
(b) Support Vector Machine (SVM)
(c) Partial Least Square-Discriminant Analysis (PLS-DA) for the training dataset
]
.pull-right[
```{r out.width="100%", fig.align='center', fig.cap=''}
knitr::include_graphics("images/fig_3.png")
```
]
---
# Model Validation (1)
.pull-left[
**ROC curves** of the testing dataset obtained from three classification algorithms (RF, SVM, and PLS-DA)
]
.pull-right[
```{r out.width="100%", fig.align='center', fig.cap=''}
knitr::include_graphics("images/fig_4.png")
```
]
---
# Model Validation (2)
.pull-left[
Metrics to evaluate the performance of classification on testing dataset:
$$sensitivity = \frac{TP}{P}$$
$$specificity =\frac{TN}{N}$$
$$ precision=\frac{TP}{TP + FP}$$
$$recall=\frac{TP}{TP + FN}$$
]
.pull-right[
```{r out.width="60%", fig.align='center', fig.cap=''}
knitr::include_graphics("images/Precisionrecall.png")
```
]
---
# Model Validation (3)
Metrics to evaluate the performance of classification on testing dataset:
- area under curve (AUC)
- sensitivity (SENS)
- specificity (SPEC)
- precision (PREC)
- recall (REC))
```{r out.width="100%", fig.align='center', fig.cap=''}
knitr::include_graphics("images/table_1.png")
```
---
class: inverse, middle, center
name: Resources
# References and Resources
---
# Resources
- [Predictive Modeling for MetabolomicsData](https://www.researchgate.net/publication/338652670_Predictive_Modeling_for_Metabolomics_Data#fullTextFileContent) Tusharkanti Ghosh, Weiming Zhang, Debashis Ghosh, Katerina Kechris
- Metabolomics datasets: [www.metabolomicsworkbench.org](https://www.metabolomicsworkbench.org)
- [R code](https://metabolomics-data.github.io/)