A spectroscopy and artificial intelligence-interaction serum analysis method, wherein, the spectroscopy and artificial intelligence-interaction serum analysis method uses silver nanowires without intrinsic Raman signal as surface enhanced Raman scattering (SERS) probes;
- a silver nanowire solution is directly liquid-phase mixed and co-incubated with serum samples from diseased patients and normal individuals, respectively;
- after incubation, serum SERS spectral data collection is performed under test of a Raman spectrometer to obtain original spectral data points;
- later, a dimension reduction is performed on the original spectral data points by using a covariance matrix, and spectral data points obtained by the dimension reduction are thus different peak positions of diseased samples compared with normal samples;
- then, a classification training and identification are further performed on the spectral data points after the dimension reduction by using a support vector machine model to finally obtain identification accuracy rates of the different diseased samples compared with the normal samples;
- wherein the spectroscopy and artificial intelligence-interaction serum analysis method specifically comprises the following steps:
- (1) preparing a purified silver nanowire solution for later use;
- and in addition, centrifuging peripheral blood plasma samples of patients with different types of diseases and normal people to obtain corresponding serum samples for later use;
- (2) performing liquid-phase mixing and incubation on the silver nanowire solution and all the above serum samples according to a same proportion to ensure that the silver nanowires are fully contacted with the serum, and after incubation, performing bulk SERS spectral data collection on all the samples by using the Raman spectrometer, during spectrum collection, a laser wavelength being 532 nm, a spectrum collection range being 600 cm−1-1800 cm−1, and each sample being subjected to spectrum collection for 5 times;
- (3) after the spectral data of all the serum samples are collected, first performing the dimension reduction on serum SERS spectral data from different sources to remove irrelevant items in sample data points, and finally, screening effective dimensions capable of reflecting data difference, specifically:
- calculating an original data dimension relevancy among different samples by using the covariance matrix, and then taking data points with a lowest relevancy as effective dimensions after the dimension reduction, the effective dimensions corresponding to different peak positions among different cases;
- (4) then, performing algorithm training:
- performing binary classification processing by taking the data points subjected to the dimension reduction as characteristic values during algorithm training and identification, dividing all the samples into a training set and a test set, and scaling data of each sample, a scaling range being [0, 1], a normalization formula used in a scaling process being:
- y
- ′
- =
- lower
- +
- (
- upper
- -
- lower
- )
- *
- y
- -
- min
- max
- -
- min
- ;
- wherein, y is data before scaling, y′ is data after scaling, lower and upper are minimum and maximum values of the data after scaling, and min/max are minimum/maximum values of the data before scaling;
- a corresponding support vector expansion being:
- f
-
- (
- x
- )
- =
- w
- T
-
- ϕ
-
- (
- x
- )
- +
- b
- =
- ∑
- i
- =
- 1
- N
- α
- i
-
- y
- i
-
- ϕ
-
- (
- x
- i
- )
- T
-
- ϕ
-
- (
- x
- )
- +
- b
- =
- ∑
- i
- =
- 1
- N
- α
- i
-
- y
- i
-
- k
-
- (
- x
- ,
- x
- i
- )
- +
- b
- ;
- wherein, k(x, xi) is a kernel function, and the above formula shows that an optimal solution of the support vector machine model is expanded through the kernel function of training samples;
- the kernel function used in the algorithm processing being a radial basis kernel function (that is, an RBF kernel function), that is:
- K
-
- (
- x
- j
- ,
- x
- j
- )
- =
- exp
-
- (
- -
- γ
-
-
- x
- ι
- -
- x
- j
-
- 2
- )
- ,
- γ
- >
- 0
- ;
- γ being a hyperparameter of a Gaussian kernel function;
- specifically:
- first, converting an original problem into a convex optimization problem:
- min
- w
- ,
- b
- ,
- ξ
- 1
- 2
-
-
- w
-
- 2
- +
- C
-
- ∑
- i
- =
- 1
- N
-
- ξ
- i
- s
- .
- t
- .
- y
- i
-
- (
- w
- ·
- x
- i
- +
- b
- )
- ≥
- 1
- -
- ξ
- i
- ,
- i
- =
- 1
- ,
- 2
- ,
- ⋯
- ,
- N
- ζ
- i
- ≥
- 0
- ,
- i
- =
- 1
- ,
- 2
- ,
- ⋯
- ,
- N
- ;
- the original problem:
- then solving the convex optimization problem;
- {circle around (1)} for a dual problem of the original problem, constructing a Lagrangian function:
- L
-
- (
- w
- ,
- b
- ,
- ξ
- ,
- α
- ,
- μ
- )
- ≡
- 1
- 2
-
-
- w
-
- 2
- +
- C
-
- ∑
- i
- =
- 1
- N
-
- ξ
- i
-
- 1
- 2
- -
- ∑
- i
- =
- 1
- N
-
- α
- i
- (
- y
- i
- (
- w
- ·
- x
- i
- +
- b
- )
- -
- 1
- +
- ξ
- i
- )
- -
- ∑
- i
- =
- 1
- N
-
- μ
- i
-
- ξ
- i
- ;
- wherein, α is a Lagrangian multiplier;
- w is a normal vector on plane and determines a direction of a hyperplane;
- b is a displacement term and represents a distance from the hyperplane to an origin;
- ξ represents a relaxation variable;
- u is a dual variable, minimum values of w, b, and ξ are firstly solved, partial derivatives are solved respectively and the derivatives are let to be 0, then results are substituted into the original function, the maximum value of a is solved for the minimum value, and then maximum value solving is converted into minimum value solving to get the dual problem:
- min
- a
- 1
- 2
-
- ∑
- i
- =
- 1
- N
-
- ∑
- j
- =
- 1
- N
-
- α
- i
-
- α
- j
-
- y
- i
-
- y
- j
-
- (
- x
- i
- ·
- x
- j
- )
- -
- ∑
- i
- =
- 1
- N
-
- α
- i
- s
- .
- t
- .
- ∑
- i
- =
- 1
- N
-
- α
- i
-
- y
- i
- =
- 0
- 0
- ≤
- α
- i
- ≤
- C
- ,
- i
- =
- 1
- ,
- 2
- ,
- ⋯
- ,
- N
- ;
- selecting
-
- K
-
- (
- x
- j
- ,
- x
- j
- )
- =
- (
- -
- γ
-
-
- x
- i
- -
- x
- j
-
- 2
- )
- ,
- γ
- >
- 0
- as the kernel function;
- {circle around (2)} from KKT condition establishment, obtaining:
- w
- *
- =
- ∑
- i
- =
- 1
- N
-
- α
- i
- *
-
- y
- i
-
- x
- i
- b
- *
- =
- y
- j
- -
- ∑
- i
- =
- 1
- N
-
- α
- i
- *
-
- y
- i
- (
- x
- i
- ·
- x
- j
- )
- ;
- wherein, C is a penalty coefficient, that is a tolerance to an error, g is a parameter of the RBF function after the RBF function is selected as the kernel function, and best parameters for C and g are selected by grid optimization through a parameter optimization tool grid. py in libsvm;
- a relation between γ and g being deduced from the following formula:
- k
-
- (
- x
- ,
- z
- )
- =
- exp
-
- (
- -
- d
-
- (
- x
- ,
- z
- )
- 2
- 2
- *
- σ
- 2
- )
- =
- exp
-
- (
- -
- gamma
- ·
- d
-
- (
- x
- ,
- z
- )
- 2
- )
- ⇒
- gamma
- =
- 1
- 2
- ·
- σ
- 2
- ;
- wherein, d(x, z) is the distance, gamma=γ, that is, a value of g is equal to the hyperparameter value of the Gaussian kernel function, and σ is a width parameter of the function;
- after the kernel function and the parameters C and g are selected, performing training by using the training set to obtain an svm model for the serum SERS spectral data, a classification decision function used in this process being:
- f
-
- (
- x
- )
- =
- sign
-
- (
- ∑
- i
- =
- 1
- N
- α
- i
- *
-
- y
- i
-
- K
-
- (
- x
- i
- ,
- x
- )
- +
- b
- *
- )
- ;
- wherein a* is obtained by an smo algorithm, K (xi, x) corresponds to the Gaussian kernel function, and b* is a threshold;
- selecting a hinge loss function as the loss function, λ∥w∥2 being a regularization term, that is:
- min
- w
- ,
- b
- ∑
- i
- =
- 1
- N
- max
-
- (
- 0
- ,
- 1
- -
- y
- i
- (
- w
- ·
- x
- i
- +
- b
- )
- )
- +
- λ
-
-
- w
-
- 2
- ;
- and (5) testing the obtained model by using the test set, comparing an actual situation with a model prediction result, and finally obtaining the identification accuracy rate and outputting a result.