Skip to content

Commit 513313e

Browse files
committed
mainly caption typos/ tables
1 parent 436bb5d commit 513313e

File tree

6 files changed

+48
-54
lines changed

6 files changed

+48
-54
lines changed

report/discussion.tex

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\section{Discussion} \label{discussion}
22

3-
\subsection{python package}
3+
\subsection{Software package for feature computation}
44

55
In order to train statistical learning methods to classify vigilance states,
66
it was necessary to compute an exhaustive set of features for all consecutive five second epochs
@@ -23,13 +23,13 @@ \subsection{python package}
2323

2424
Several \texttt{PyEEG} functions were also found to be inconsistent with mathematical
2525
definitions (see \pr{} documentation, appendix).
26-
This unfortunatly apperas to be a common issue for accademic software.
27-
The general status of the peer-review process and the reproducibility of programs and algorithms have
26+
This unfortunatly apperas to be a common issue for academic software.
27+
The general status of the peer-review process and the reproducibility of programs and algorithms have
2828
recently drawn attention (see \citationneeded{Black-box; Can I reproduce your algo} for discussions about this issue).
2929

30-
\subsection{Originality of feature extraction}
30+
\subsection{Exhaustive feature extraction}
3131

32-
Feature exctraction in the present study contrasts with previous work in two respects.
32+
Feature extraction in the present study contrasts with previous work in two respects.
3333
First of all, features were exhaustively computed not only on raw signals,
3434
but also on all wavelet frequency sub-bands.
3535
Then, new variables were created to account for temporal consistency of vigilance state episodes.
@@ -61,7 +61,7 @@ \subsection{Originality of feature extraction}
6161
The convolution approach (eq.\ref{eq:window}) appeared to provide better results.
6262
Instead of averaging feature after calculation, it may be advantageous to compute features over epochs of different length in a first place.
6363
Thus, the accuracy of local of non additive features, such as median, will be improved. In addition to local mean of feature, other variables, such as local
64-
slope and local variance of each feature may improve classification \citationneeded(Deng 2013).
64+
slope and local variance of each feature may improve classification \citationneeded{(Deng 2013).}
6565

6666
Although addition of time-dependent variables improved accuracy over a time-unaware model, their use can be seen as controversial.
6767
Indeed, including prior information about sleep structure will cause problems if the aim is to find differences in sleep structure.
@@ -77,7 +77,7 @@ \subsection{Originality of feature extraction}
7777

7878

7979

80-
\subsection{Random forest}
80+
\subsection{Random forest classification}
8181

8282
In this study, random forest\citationneeded{} classifiers were exclusively used.
8383
In addition to their capacity to model non-linearity, they are very efficient at handling very large number of variables.
@@ -95,7 +95,7 @@ \subsection{Random forest}
9595

9696

9797

98-
\subsection{Rigorous model evaluation}
98+
\subsection{Rigorous and comprehensive model evaluation}
9999

100100
Previous research, using classical statistical learning framework,
101101
have often assessed their classifier through cross-validation.
@@ -110,7 +110,7 @@ \subsection{Rigorous model evaluation}
110110
with all the even hours (from start of the experiment) and testing it with all the odd ones.
111111
There are several way to reduce overfitting including limiting the maximal number of splits when growing classification trees, or pruning trees.
112112
However, it never possible to unsure a model will not overfit \emph{a priori}.
113-
Thus it remain necessary toassess the model fairly.
113+
Thus it remain necessary to assess the model fairly.
114114
In this study, systematic stratified cross-validation was performed.
115115
As a result, all predictions made on any 24h time series are generated by models
116116
that did not use any point originating from this same time series. This precaution simulate the the behaviour of the predictor with new recordings.
@@ -140,10 +140,10 @@ \subsection{Quality of the raw data}
140140
For instance, if, for a given epoch, there is strong disagreement between experts, the confidence will be low.
141141
When training a model, this uncertainty can be included, for instance, as a weight.
142142

143-
\subsection{Final result}
143+
\subsection{Overall results}
144144
The predictions of the classifier presented in this research agreed with ground truth for 92\% of epochs (table~\ref{tab:confus}).
145145
Although the limitation of the ground truth annotation make it is hard to put this result into perspective,
146-
this score is very promissing.
146+
this score is very promising.
147147
In addition, prediction did not result in significant difference in prevalences.
148148
However, there were, on average, much less \gls{rem} episodes in the predicted time series.
149149
The duration of \gls{rem} episodes was also over-estimated by prediction (though this is only marginally significant).
@@ -174,3 +174,4 @@ \section*{Availability}
174174
and the package will be released shortly, as an open-source software, in the official python repositories.
175175

176176

177+

report/matmet.tex

+25-33
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
\section{Material and Methods} \label{matmet}
22

3-
\subsection{Data}
4-
5-
\subsection{Preprocessing}
3+
\subsection{Data acquisition}
4+
%~
5+
In this study, 12 male mice (Tg(Gal-cre)KI87Gsat/Mmucd, FVB/N-Crl:CD1(ICR) hybrid strain),
6+
between 8 and 12 week old were used.
7+
Animal were housed under a 12h light/dark light cycle.
8+
Small (diam. = 1mm) holes were drilled in the scull of anaesthetised animals.
9+
For the \gls{eeg}, the reference-ground electrode was placed into the parietal bone (Bregma -1.5, mediolateral (ML) +1.5) and
10+
the other electrode was placed into the frontal bone (Bregma +1.5, ML -1.5).
11+
For \gls{emg} acquisition, three polytetrafluoroethylene-insulated stainless steel electrodes were placed into the neck muscles.
12+
13+
Both signals were recorded by a miniature `neurologger' \citationneeded{ Vyssotski et al.,2006}.
14+
The recording device applies band-pass analogue filtering between 1 and 70Hz and converts both analogue signals to digital time series at a sampling rate of approximately 200.0Hz.
15+
All 12 animals were monitored for approximately 24h.
16+
17+
Sleep scoring was performed in a semi-automatic fashion by a trained expert.
18+
A first, human assisted, pass was applied to generate preliminary annotations on the basis of logical rules \citationneeded{}.
19+
Then, the expert visually inspected and, when required, corrected the annotations.
20+
Annotation were generated for consecutive epochs of approximately 5.0s.
21+
%~
22+
\subsection{Data preprocessing}
623

724
\gls{eeg} and \gls{emg} signals were resampled from approximately 200.0Hz to 256.0Hz using
825
conservative sinc interpolation\citationneeded{Putman}.
9-
A sampling frequency of $f_s = 256.0Hz$ is convenient since is implies that discrete wavelet decomposition (see subsection~\ref{sub:features} and fig.~\ref{fig:dwd}) will separate
26+
A sampling frequency of $f_s = 256.0$Hz is convenient since is implies that discrete wavelet decomposition (see subsection~\ref{sub:features} and fig.~\ref{fig:dwd}) will separate
1027
frequencies above 4.0Hz from those below 4.0Hz (since $4 = 256.0/{2^6} $).
1128
This frequency is typically uses as a cut-off value between theta and delta waves \citationneeded{}.
1229
In addition, \gls{eeg} and \gls{emg} signals were standardised ($E[x] = 0, Var[x] = 1$) to account for the variability in baseline amplitude due to acquisition.
1330
Vigilance state anotations were resampled at exactly 0.20Hz using nearest neighbour interpolation.
1431

15-
\subsection{Feature extraction}
32+
\subsection{Feature extraction from time series}
1633
\label{sub:features}
1734

1835
A wavelet transform based feature extraction strategy was adopted.
@@ -61,31 +78,6 @@ \subsection{Addition of temporal features}
6178

6279

6380
\subsection{Stratified Cross Validation and sampling}
64-
%~ Generally, success of classification of vigilance stages is assessed by cross-validation.
65-
%~ In many studies\citationneeded{}, it is implied that cross-validation was performed by making $k$ random training subsets
66-
%~ of the whole data and assessing the model fitted on the remaining subsets (\ie{} k-fold cross-validation).
67-
%~ In this context, since features are calculated for every epoch
68-
%~ Therefore, epochs are the statistical individuals.
69-
%~
70-
%~ When working with dense time series (or, for instance, spatial data), it can be suspected that within a statistical block (group),
71-
%~ both features and response variables are very correlated with neighbouring data points.
72-
%~ For instance, the features and label at $t_n$ are expected to be largely similar to the features, and labels at $t_{n+1}$ and $t_{n-1}$.
73-
%~ In statistical terms, $t_{n+1}$ is not independent of $t_{n}$.
74-
%~
75-
%~ If the training sets are drawn completely at random, from a dataset containing multiple long recordings,
76-
%~ the underlying time series would only be made marginally sparser, and the data points missing from
77-
%~ a time series could simply be inferred from the neighbouring points which remain in the training set.
78-
%~ This temporal pseudo-replication may result in model overfitting and give the false impression
79-
%~ that a model has a very strong predictive power.
80-
%~
81-
%~ The goal of cross-validation is to assess how well a predictive model would perform on \emph{new data}.
82-
%~ This study, and most similar studies, aims at providing a tool to automatically annotate \emph{new recordings}.
83-
%~ Therefore, it is fairer to perform \emph{stratified cross-validation}, using the different recordings as the stratum levels.
84-
%~ In this study, all cross-validation were performed by training the model with epochs originating from all but one recordings,
85-
%~ and testing it on the recording kept out. This was repeated by successively leaving each recording out.
86-
87-
%~ As shown in figure~\ref{fig:sleep_description}, the prevalence of different states is not balanced. Noticeably, \gls{rem} sleep represents only $10\%$ of all epochs.
88-
%~ This implies that $90\%$ accuracy could be achieved even if all \gls{rem} epoch were misclassified.
8981

9082

9183
Stratified cross-validation was systematically applied to generate vigilance state predictions.
@@ -96,7 +88,7 @@ \subsection{Stratified Cross Validation and sampling}
9688
Class unbalancedness was accounted for by fitting predictors on balanced subsamples (750 epochs of each class per tree).
9789

9890

99-
\subsection{Random forests}
91+
\subsection{Random forests analysis}
10092
Unless specified otherwise, random forests \citationneeded{} were trained with balanced samples of 1000 epochs per class.
10193
In order to select variables and define new features, forests with 50 classification trees were built.
10294
100 trees were used otherwise.
@@ -159,5 +151,5 @@ \subsection{Statistical analysis}
159151
linear mixed model\citationneeded{} on log-transformed duration, using recordings (\ie{} animals) as a random effect, was fitted.
160152
Then, interaction between state and method were tested with a t-test.
161153

162-
163-
154+
Statistical analysis was performed with \texttt{R}, unsing the \citationneeded{} packages.
155+
%~

report/report.tex

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
%~ \geometry{bindingoffset=1cm}
99
\usepackage{fullpage}
1010
\usepackage{multirow}
11+
%~ \usepackage{wasysym}
1112
\usepackage{setspace}
1213
\doublespacing
1314

report/tables/benchmark.tex

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
\begin {table}[!h]
22
\begin{center}
33
\caption{\ctit{Performance improvements over \texttt{PyEEG}.}
4-
In order to improve performance, modifications of the algorithms implemented in \texttt{PyEEG} were carried out.
5-
In addition, several mathematical inconsistencies were also discovered and corrected.
6-
The table compares how long, on average, each algorithm would take, for a random sequence of length $1280$ (\ie{} $5s$ at $256Hz$).
4+
In order to improve performance, modifications of the algorithms implemented in \texttt{PyEEG} were carried out.
5+
This table compares how long, on average, each algorithm would take, for a random sequence of length $1280$ (\ie{} $5s$ at $256$Hz).
76
It also represents how many added points would lead to a tenfold runtime increase.
87
For the tested range ($n \in [1280;7680] $), all algorithms add approximately an
9-
exponential time complexity ($10^{O(n)}$), $R^2 > 0.95$, for all.
10-
\textbf{1}: whether the original implementation was corrected in order to match mathematical definition.
8+
exponential time complexity ($10^{O(n)}$, $R^2 > 0.95$, for all).
9+
Several mathematical inconsistencies were also discovered and corrected.
10+
The rightmost column (\textbf{\textdagger}) indicates whether the original implementation was
11+
corrected in order to match mathematical definition. Each alteration is mathematically justified in the section \texttt{pyrem.univariate} of the \pr{} documentation (see appendix).
1112
\textbf{(-)}: indicates a worse performance of \pr{} over \pyeeg{}.
12-
Each alteration is mathematically justified in the section \texttt{pyrem.univariate} of the \pr{} documentation (see appendix).
1313
Significance levels: $^{***}$, $p-value < 10^{-3}$; $^{**}$, $p-value < 10^{-2}$, see Material and Methods for detail about statistical analysis.
1414
\label{tab:benchmark}
1515
}
@@ -20,7 +20,7 @@
2020
\hline
2121
\hline
2222

23-
algorithm & function & \specialcell{$t$(ms) for \\$n = 1280$} & \specialcell{$n$ for $\times 10$\\increase} & \specialcell{$t$(ms) for \\$n = 1280$} & \specialcell{$n$ for $\times 10$\\ increase} & fix$^1$\\
23+
algorithm & function & \specialcell{$t$(ms) for \\$n = 1280$} & \specialcell{$n$ for $\times 10$\\increase} & \specialcell{$t$(ms) for \\$n = 1280$} & \specialcell{$n$ for $\times 10$\\ increase} & fix\textsuperscript{\textdagger}\\
2424

2525
\hline
2626
\hline

report/tables/confus.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
\label{tab:confus}
1010
}
1111
\footnotesize
12-
\begin{tabular}{|c|c|c|c|c|c|}
12+
\begin{tabular}{|c|c|c|c|c||c|}
1313
\hline
1414
& & \multicolumn{3}{|c|}{Prediction} & \multirow{2}{*}{PPV$^a$} \\
1515
& & NREM& REM& WAKE &\\
@@ -19,7 +19,7 @@
1919
& NREM & 47.9& 1.36& 3.03 & 0.92\\
2020
& REM & 0.63 & 5.14& 0.25 & 0.85\\
2121
& WAKE & 2.24& 0.42& 39.3 & 0.94\\
22-
\hline
22+
\hline\hline
2323
\multicolumn{2}{|c|}{Sensitivity} & 0.94 & 0.74 & 0.92 &$0.92^b$\\
2424
\hline
2525

report/tables/importances.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
\begin{center}
33
\caption{\ctit{Relative variable importance of the 21 selected features.}
44
Random forest algorithm can produce a value to quantify variable importance.
5-
Variable importance quantify how much, statistically, a variable contributes to predictive accuracy.
5+
Variable importance corresponds to how much, statistically, a variable contributes to reducing the prediction inacuracy (or, to be more precise, the Gini impurity).
66
Starting from 164 variables, the least important variables were recursively eliminated.
77
This table represents the 21 most important remaining features.
88
Features from both \gls{eeg} and \gls{emg} are important for accurate prediction.

0 commit comments

Comments
 (0)