-- Overview of the Matlab integration is available on the main thesis script. --


SCRIPTS:
data_processor : reads experiments from '.txt' inside PINN_LSTM\ACQ or PINN_LSTM\ACQ\backups directories and loads physical constants. It low pass-filters all timeseries, separates experiments in training and validation sets, and builds the dlarrays. If the machine has a discrete Nvidia GPU that supports CUDA (see parrallel computing toolbox requirements for minimum CUDA compute capabilities) this script will build gpuArrays to enable hardware accelerated computation (~ 2x to 4x speed increase). If the machine has an incompatible GPU (AMD ROCm 2 is not currently compaible with gpuArrays/dlarrays, neither Apple Silicon METAL api), computation will be performed with CPU. Run data_processor to build standard CPU dlarrays without the gpu support conversion.


ASTIB_Training : performs bayesian optimization of hyperparameters as detailed in Chapter 4.2 of the main script. It then saves a .mat variable containing the final hyperparameter combination. Loading it inside LSTM_custom_main will enable optimized training.
NOTE: computation is automatically parallelized through the batch dimension B of a dlarray (C x T x B), using bayesopt with (...,'UseParallel',true) specifier isn't related to this parallelization. It will run bayesopt in multiple parallel instances with different points in hyperparameters sample space, this is not necessary here.


LSTM_Custom_main : performs a final 1000 epochs training. Detailed real time training metrics (losses diagrams and logs) are enabled closely monitor the training process. At the end it plots all the results.

NUMBERS PRECISION:
All the variables, main network arrays and physical constants should use FP32 single precision floating point to improve performances with previous generations Tensor Cores.
This is obtained in MATLAB with the single() function.

a = 15;		 - Returns a 64 bit double precision floating point.
a = single(15);  - Returns a 32 bit single precision floating point.

If a is FP64, any calculation including 'a' and another FP64 variable, promotes the result to FP64.

a = 15;		FP64
b = single(2);  FP32
c = a*b;
> c = 30 - Now c is FP64, slowing down computation.