\( g_{_{W}}:\mathbb{R}^{n} \times \mathbb{R}^{n} \to [0,1]^{m} \)
\( n = 28 \, (pixels) \)
\( m = 10 \, (classes) \)
\( g_{_{W}}:\mathbb{R}^{n} \times \mathbb{R}^{n} \to \mathbb{R}^{n} \times \mathbb{R}^{n} \)
\( z_{1} = W^{1} x \)
\( a_{1} = f^{1}(z_{1}) \)
\( \Downarrow \)
\( z_{l} = W^{l} a_{l-1} \)
\( a_{l} = f^{l}(z_{l}) \)
\( \Downarrow \)
\( y = f^{L}(z_{L}) \)
Sigmoid \[ f(x)=\frac{1}{1 + e^{-x}} \]
Tanh \[ f(x)=\frac{e^{x}-e^{-x}}{e^{x} + e^{-x}} \]
ReLU\[ f(x)=max\{0,x\} \]
Leaky ReLU\[ f(x)=f(x)=max\{0.01x,x\} \]
Softplus \[ f(x)=ln(1 + e^{x}) \]
- A convolution window (also called filter) moves across the input and produces and output with element by element multiplication
- The weights \( W \) are the parameters of the filter (9 in this case). The convolution is defined by a size (3x3) and a stride (1x1)
- Multiple filters can be used over a single input
- The input can be padded in different ways and for different reasons (for instance to preserve the input dimensions)
Credits to: https://mlnotebook.github.io/
The dataset consists of input data (images) and output data (labels). When trained on a large amount of hand labeled data the network can learn to correctly classify previously unseen images. A well trained neural network outputs correct labels.
\[ Loss = \mathcal{L}(g_{_{W}}(x),y) \]
\[\mathcal{L}(g_{_{W}}(x),y) = \sum _{i}^{data} \lvert \lvert g_{_{W}}(x_{i}) - y_{i} \rvert \rvert_{1} \]
\[\mathcal{L}(g_{_{W}}(x),y) = \sum _{i}^{data} \lvert \lvert g_{_{W}}(x_{i}) - y_{i} \rvert \rvert_{2} \]
\[\mathcal{L}(g_{_{W}}(x),y) = \sum _{i}^{data} CE(g_{_{W}}(x_{i}) - y_{i}) \]
...
\( \gamma = learning \, rate \)
\[ \mathcal{L}_{batch} = \sum _{i}^{n_{batch}} (g_{_{W_{0}}}(x_{i}),y_{i})\]
\[ n_{batch} = 32 \, (64, 128) \]
...
\( \gamma = learning \, rate \)
The Network
\[ \mathcal{L}(g_{_{W}}(x),y) \]
The Data: Training Set
The Data: Validation Set
Epoch \( \Rightarrow \) One full pass through the whole training set
The RUFF dataset consists of more than 1600 different classes of spectra, with an uneven number of spectra for each class
The dataset was split in training and validation set leaving just one sample spectrum per class in the validation set
The network is a one-dimensional convolutional neural network that takes a Raman spectrum as an input and outputs a chemical compound class as an output
Our dataset consists of 1322 different classes of preprocessed spectra, with 12 to 20 spectral samples for each class. One third of the data is assigned to the validation dataset.
Original
Noise
Baseline
Magnitude Warping
Energy Warping
All Augmentations
96% accuracy on the validation set
Retraining is always boring, and requires a GPU!!!
No retraining and potentially no need for supervision!!!