Let’s take a look at oscillatory trajectories presented in the sensor array data from breathing MOX sensors.
The sensor array data to visualize trajectories can be loaded from RData file spirals-pub.RData, giving the following list of variables.
- Sensor array readings ‘X’ pre-processed with a high-pass filter and correspondent factors ‘Y’ and their colors ‘Ycol’ for three analyte classes: acetone at 0.05 vol.%, ethanol at 0.01 vol.% and their binary mixture.
- Note that the data in ‘X’ contains only 4 oscillation periods to produce more clear graphics (See Figure 2).
- Original readings from one of the sensor ‘Xs’ that contains both amplitude and oscillatory parts of the signal.
R code to make figures is given below.
matplot(Xs, type='l', col=unique(Ycol), lty=1, lwd=2)
legend("topleft", legend=levels(Y), col=unique(Ycol), lty=1, lwd=2)
plot(X[, 1], type='p', col=Ycol, pch=20)
legend("topleft", legend=levels(Y), col=unique(Ycol), pch=20)
mod <- prcomp(X, center=TRUE, scale=TRUE)
plot3d(mod$x[, 1:3], col=Ycol, type="l", lwd=2)
Figure 1. The original sensor signal ‘Xs’ from one of the sensors.
- The visualization of the trajectories with PCA gives an idea that the 2D structure of features encode the respiration oscillations common for all classes and also the amplitude dependent of analyte concentration.
- On the other hand, observation of the trajectories in the 3D space suggests that an extra class-relevant information can be found in higher dimensions of data.
- In the given case of only three trajectories, the captured variance per three principal components is distributed as 48%, 29% and 8%, while the numbers are different (more “high-dimensional”) if more trajectories are included.
Interactive 3D Java Applet
View the applet in a separate web page spirals.html.