• No results found

Principal Component Analysis to extract Raman information

2. Bio-medical Raman Spectroscopy – An Overview

3.3 Theoretical background of Wavelength Modulated Raman spectroscopy

3.3.1 Principal Component Analysis to extract Raman information

PCA is a standard data analysis tool which is widely used in a variety of fields ranging from neuroscience to computer graphics. It is a simple tool to extract useful information from a large data set. PCA can reduce a complex data set into one with lower dimensions revealing the pattern in the data. If we consider a multidimensional data set consisting of observations and variables, PCA transforms or rotates the variable axis resulting in an orthogonal space where the new set of axes (Principal components) will be in the descending order of the variation of the data set. That means the first principal component (PC) gives the maximum variation among the data set, the second PC gives the next highest variation. This implies that the majority of the higher order PCs will have negligible variance (less than noise level) and hence can be ignored resulting in a reduced dimensionality of the data set without losing any information regarding the variance75. This is depicted in Figure 28.

Figure 28: Plot depicting the projection of a data along the principal components. X1 and X2 are the original dimensions. Component 1 and component 2 corresponds to the transformed dimensions.

If we have a one dimensional data set (matrix or vector), X=[x1,x2,x3………..xn], the relationship between the different points can be expressed in terms of the mean and the standard deviation. The standard deviation gives the spread of the data around the mean.

Where, the mean

1 n i Xi X n     (3-6)

And the standard deviation is given by,

2 1( ) ( 1) n i Xi X s n       (3-7)

Another measure of the spread of the data can be expressed in terms of the variance, which is essentially the square of the standard deviation, given by

2 2 1( ) ( 1) n i Xi X s n       (3-8)

Now if we consider the case of a two dimensional data set or matrix such as X=[x1,x2,x3………..xn], Y=[y1,y2,y3,………..yn], then the spread of data between them can be expressed in terms of the co-variance, which is essentially the variance calculated between each dimension,

1( )( ) cov( , ) ( 1) n i Xi X Yi Y x y n         (3-9)

For a three dimensional matrix, we might have to calculate cov(x,y), cov(x,z) and cov(y,z). So for a multidimensional data set such as the WMRS data there will be n!/ (n- 2)!*2 different covariance values. A covariance matrix can be then arranged with these covariance components. For the two-dimensional data given above the covariance matrix would constitute of the following covariance components: cov(x,x), cov(x,y), cov(y,x), cov(y,y). With a covariance matrix in hand, we can then calculate the Eigen value (ev) and the Eigen vector (EV) of the matrix. The idea of evand the EV is explained in the next section.

Let us consider the case of multiplying a vector ‘x’ by another square matrix ‘A’, this gives us another vector ‘b’. The linear equation for this is given by

Axb (3-10)

Certain exceptional vectors ‘x’are in the same direction as ‘Ax’, making ‘b’ a scaling of ‘x’ by say ‘λ’.

Axx (3-11)

Now, ‘x’is called the Eigen vector (EV) and the ‘λ’ is called the Eigen value (ev) and the matrix ‘A’, which transforms the vector, is called the transformation matrix. In other words, if we consider a 2D vector, it can be represented as a point in a xy Cartesian system. If multiplying it with a square matrix results in the scaling of the 2D vector, then

it means that the direction of the 2D vector gets preserved. This procedure is called Singular Value Decomposition (SVD).

In order to plot a WM spectrum, the covariance matrix is calculated after subtracting the mean spectrum from each of the spectra. From this mean adjusted data set, the EV and the evcan be calculated directly. The EV corresponding to the highest ev gives the first principal component and the EV corresponding to the next highest evgives the second principal component and so on. The intensity plot of the first principal component corresponds to the WM-spectra. This plot is also called the loading of PC1 or the Eigen spectrum and the percentage of the total variance is sometimes called the Eigen energy. So in the case of WMRS, the different wavelengths can be considered as the variable and each pixel (1 to 1024 in this case) where the Raman peaks shift with the shift in wavelength can be considered as the observation.

PCA can also be used for feature selection in discriminating between different sample types, based on information from each sample, recorded in a multi-parameter space. For example, in order to classify between different cell types based on their Raman spectra, the pixels (Raman shift) should be considered as the variable and each Raman measurements should be the observation. After evaluating the EV and ev, a feature vector is formed by rearranging the EVs according to the descending order of the ev, it should be noted that the EVs of a matrix are always orthogonal to each other and to standardise it, it is usually the unit EVs which are used. So by the process of finding the EV of the covariance matrix, we have now evaluated the lines or the axes or PCs that characterise the data. The next step is to project or transform the original data such that it gets expressed in terms of these new orthogonally transformed axes. In order to achieve this, the transpose of the feature vector is multiplied with the original data set. The new transformed dataset would have a set of new dimensions where the variance of the dataset would be in descending order. The first few PCs would contain the majority of the variance within the dataset. Hence we can discard higher PCs, resulting in a reduced dimensionality of the dataset. This reduced dataset can be used for classification using various algorithms such as nearest mean classifier and support vector machines.

3.4 Wavelength modulated Raman spectroscopy – Need for