Skip to main content
. 2023 Mar 13;23(6):3076. doi: 10.3390/s23063076
Algorithm 1: Model transfer algorithm based on an autoencoder
Input: The master spectrometer data X, slave spectrometer data Y;
Output: The reconstructed data after model transfer from the instrument;
1 Main procedure
2 Bias B and weight W in the autoencoder neural network of the master and slave instrument are randomly initialized. The parameters such as training times and learning rate of the model are set;
3 Compute the hidden layer variables Hx and Hy, calculate the optimization objective function and optimize the whole model;
4 Optimized the hyperparameters of the autoencoder according to the Bayesian optimization algorithm, and the bias B and weight W were updated continuously by the gradient descent method until the optimal objective function value was found;
5 Save the slave encoder and the master decoder models to form the model transfer structure based on the improved autoencoder.