-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
231 lines (192 loc) · 11.1 KB
/
index.html
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html>
<style>
.top-buffer { margin-top:20px; }
</style>
<body style="background-color:D3D3D3;">
<body>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</body>
</html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Epilepsy Lateralization </title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/starter-template/">
<!-- MathJax -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<!-- Bootstrap core CSS -->
<link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="starter-template.css" rel="stylesheet">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top" style = "background-color: #011F5b;">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Calculator <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://academic.oup.com/braincomms/article/6/5/fcae284/7739025">Publication</a>
</li>
</div>
</nav>
</header>
<main role="main" class="container text-center ">
<br>
<h1 class="mt-5" style="font-size: 24px;"> Interictal intracranial EEG spike asymmetry to predict seizure onset zone laterality in temporal lobe epilepsy </h1>
</main>
<div class="row mt-4"></div>
<div class="container">
<!-- Row with two columns -->
<div class="row top-buffer">
<!-- Left Column for Inputs -->
<div class="col-md-6">
<div class="row top-buffer">
<div class="col-md">
<label for="LSR"> Number of spikes in the LEFT temporal lobe (in 5 or more randomly chosen one-minute segments in sleep): </label>
<input id="LSR" type="number" value="0" min="0" required>
<span class="validity"></span>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<label for="RSR"> Number of spikes in the RIGHT temporal lobe (in 5 or more randomly chosen one-minute segments in sleep): </label>
<input id="RSR" type="number" value="0" min="0" required>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<button type="button" class="btn btn-dark" onclick="myFunction()"> Submit </button>
</div>
</div>
</div>
<!-- Right Column for Results -->
<div class="col-md-6">
<div class="row top-buffer">
<div class="col-md">
<h5> Spike rate asymmetry index: <p class="text-nowrap" id="ai"> </p> </h5>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<h5> Probability of a left-sided seizure onset zone according to Model 1: <p class="text-nowrap" id="demo_left"> </p> </h5>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<h5> Probability of a right-sided seizure onset zone according to Model 2: <p class="text-nowrap" id="demo_right"> </p> </h5>
</div>
</div>
</div>
</div>
<div class="row mt-4"></div>
<div class="row top-buffer">
<div class="col-md">
<h4> Calculator Information:</h4>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p><em>Purpose:</em> Use the relative proportion of interictal spikes in the left and right temporal lobes to predict the side (left or right) of the seizure onset zone in patients with temporal lobe epilepsy undergoing intracranial EEG. </p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p><em>Instructions for use:</em> Choose five or more randomly chosen one-minute segments of intracranial EEG data in sleep. Count (manually or using an automated spike detector) the number of spikes in the temporal lobe contacts. Take the average across the left-sided contacts and across the right-sided contacts to obtain the average spike rates in the left and right temporal lobes. Input these values in the calculator. The units (spikes/minute or spikes/hour, etc.) do not matter in the calculation.</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p><em>Interpretation of results</em></p>
<p>The equation for asymmetry index (<em>AI</em>) is:</p>
<p>
\[\frac{Spikes_{Left} - Spikes_{Right}}{Spikes_{Left} + Spikes_{Right}}\]
</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p> Where <em>Spikes<sub>Left</sub></em> is the number of spikes in the left temporal lobe, and <em>Spikes<sub>Right</sub></em> is the number of spikes in the right temporal lobe. <em>AI</em> ranges between -1 and 1. A positive <em>AI</em> implies more spikes on the left, a negative <em>AI</em> implies more spikes on the right, and an <em>AI</em> of zero implies an equal number of spikes in the left and right temporal lobe. </p>
<p>The formula for Model 1 (predicting the probability of left-sided seizure onset zone) is:</p>
<p>\[Probabililty_{Left} = \frac{1}{1+exp(-coef_{1} - AI \times coef_{2})}\]</p>
<p>\[coef_{1} = -0.4139, coef_{2} = 2.5970\]</p>
<p>The formula for Model 2 (predicting the probability of right-sided seizure onset zone) is:</p>
<p>\[Probabililty_{Right} = \frac{1}{1+exp(-coef_{3} - AI \times coef_{4})}\]</p>
<p>\[coef_{3} = -0.0013, coef_{4} =-1.3263\]</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p> These probabilities are the outputs of two separate logistic regression models trained on data from patients at the Hospital of the University of Pennsylvania. The models separately predict the probabilities of left- and right-sided seizure onset zones.</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p> Note that the models may give conflicting information (e.g., Model 1 may predict a high probability of left-sided seizure onset zone, and Model 2 may predict a high probability of right-sided seizure onset zone). In this case, predictions should be treated with additional caution, and the user should note that Model 1 had higher accuracy than Model 2 in the original study.</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p><em>Accuracy of the results:</em></p>
<p>When the models were validated using cross-validation on the internal dataset of patients from the Hospital of the University of Pennsylvania, the performance of the two models was:</p>
<p>Model 1: AUC = 0.83, balanced accuracy = 78.9%</p>
<p>Model 2: AUC = 0.68 balanced accuracy = 57.4%</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p>When the models were tested on an external dataset of patients from Medical University of South Carolina at the same operating point as that of the internal dataset (a cutoff of a probability of 0.5), the performance was:</p>
<p>Model 1: balanced accuracy = 79.3%</p>
<p>Model 2: balanced accuracy = 78.9%</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<p>The difference in performance for Model 2 between the two centers may be due to the imbalance between the two centers in how many patients had left-sided seizure onset zones and how many had right-sided seizure onset zones.</p>
</div>
</div>
<div class="row top-buffer">
<div class="col-md">
<!--
<p>References</p>
//-->
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="../../assets/js/vendor/popper.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<script>
function myFunction() {
var coef = [-0.4139, 2.5970, -0.0013, -1.3263];
var AI = ( Number(document.getElementById("LSR").value) - Number(document.getElementById("RSR").value) ) / ( Number(document.getElementById("LSR").value) + Number(document.getElementById("RSR").value) );
var prob = 1 / (1 + Math.exp(-coef[0] - (coef[1] * AI)));
var prob2 = 1 / (1 + Math.exp(-coef[2] - (coef[3] * AI)));
prob = prob * 100;
prob = prob.toPrecision(3);
prob = prob.toString();
prob = prob + "%";
prob2 = prob2 * 100;
prob2 = prob2.toPrecision(3);
prob2 = prob2.toString();
prob2 = prob2 + "%";
AI = AI.toPrecision(2);
AI = AI.toString();
document.getElementById("demo_right").innerHTML = prob2;
document.getElementById("demo_left").innerHTML = prob;
document.getElementById("ai").innerHTML = AI;
}
</script>