## 3 Algorithms for Validation and Ranking
### Feature Extraction  
Before detailed definitions of the actual features are given, the helper function \(u\) is introduced. It yields the smallest index of a measurement \(\mathbf{m}\in M\), at which the average of a surrounding window reaches a relative amount \(\tau_{u}\) of the reaction's peak. The threshold \(\tau_{u}\) and the window size \(\omega_{u}\) can be chosen as needed. The arithmetic mean of all values in a measurement is denoted with \(\bar{\mathbf{m}}\). The definition of \(u\) is based on a case differentiation regarding the main direction of the reaction's slope:  
\[u(\mathbf{m},\tau_{u})= \begin{cases}\min\{i\mid z\geq\tau_{u}\}&\text{if $ \mathbf{m}$ has a positive-slope reaction},\\ \min\{i\mid z\leq 1-\tau_{u}\}&\text{else},\end{cases}  \tag{6}\]  
\[\text{with}\quad z=\overline{\mathbf{m}_{a}^{\prime}\langle i,\omega_{u} \rangle},\quad i\in\mathbb{N},1\leq i\leq|\mathbf{m}_{a}|\quad\text{and}\quad \tau_{u}\in\mathbb{R},0<\tau_{u}<1.\]  
Moreover, some of the features depend on the slope \(m_{\mathbb{K}}\) of a linear regression model, defined in the following sample-wise definition of \(\hat{\mathbf{x}}\). \[\hat{\mathbf{x}}[i]=m_{\hat{\mathbf{x}}}\cdot i+b_{\hat{\mathbf{x}}} \tag{7}\]  
The overall performance indicator for each measurement is calculated based on quantifiable features, which are each defined as a function \(f_{j}:M\rightarrow\mathbb{R}\). All features are part of the feature set \(F\) and can be referenced using an index \(j\in\mathbb{N}\) with \(1\leq j\leq|F|\). The following initial set of features was identified after interviewing a domain expert in the field of MOX gas sensors. The features were then formalized in the following list. All features marked with \({}^{-1}\) need to be inverted after normalization because a higher value will always be considered better for the performance metric introduced later in this section. 1. Sensitivity The sensitivity quantifies how strong a sensor reacts to the analyte it is exposed to [18,19]. It is calculated by subtracting the mean-value of a window \(a=\overline{\mathbf{m}_{a}\langle|\mathbf{m}_{a}|,119\rangle}\) containing the samples of the last 120 s of analyte exposure from the mean value of a window \(b\) that contains the samples of the last 120 s before gas exposure (baseline), divided by the latter. \[f_{1}(\mathbf{m})=\frac{b-a}{b}\quad\text{with}\quad b=\overline{\mathbf{m}_{b }\langle|\mathbf{m}_{b}|,119\rangle}\quad\text{and}\quad a=\overline{\mathbf{m} _{a}\langle|\mathbf{m}_{a}|,119\rangle}\] (8)
2. Reaction Speed I \({}^{-1}\) This measure is an indicator of how fast the sensor reacts to the analyte it is exposed to. It covers the time from the start of the exposition to the analyte until the reaction reaches 50 % of its overall strength. \[f_{2}(\mathbf{m})=u(\mathbf{m},0.5)\] (9)3. Reaction Speed II \({}^{-1}\) The time between reaching 50% and 90% of the maximum reaction is used as a second measure for the reactivity of the sensor. \[f_{3}(\mathbf{m})=u(\mathbf{m},0.9)-u(\mathbf{m},0.5)\] (10)
4. Plateau Quality \({}^{-1}\) Ideally, after a transient response, the sensor signal will reach a plateau. Therefore the slope of a linear regression curve between the point where 90% of the maximum signal is reached and the end of the analyte segment can be used to quantify the quality of this plateau. \[f_{4}(\mathbf{m})=|m\widehat{\mathbf{m}_{\mathrm{a}}(l,r)}|\quad\text{with} \quad l=u(\mathbf{m},0.9)\quad\text{and}\quad r=|\mathbf{m}_{\mathrm{a}}|\] (11)
5. Drift \({}^{-1}\) The slope of a linear regression curve fitted through the baseline segment shows a possible drift of the sensor resistance. While a small slope might be acceptable, higher drift leads to possible unstable sensor behaviour in the field. \[f_{5}(\mathbf{m})=|m\widehat{\mathbf{m}_{\mathrm{b}}}|\] (12)
6. Repeatability \({}^{-1}\) The similarity between all measurements of the same sensor/analyte combination is an indicator of the repeatability.