## 3 Concept and Methodology
### Machine Learning and Data  
As already stated, COMSOL Multiphysics is used to simulate laser beam refraction for different wavelengths \(\lambda\) (nm), temperatures \(T\) (\({}^{\circ}\)C), incident angles \(\theta_{i}\), air-water concentration (\(W_{air}/W_{water}\)), and for two types of water samples (pure water and salt water). The distance \(d\) will therefore be calculated for each parameter, feature, or variable change, \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Example**} & **Distance \(d\) (cm)** & **Distance \(d\) (cm)** & **Error** \\  & **Using Equation (3)** & **Using COMSOL** & \\ \hline
1 & 3.29951 & 3.29950 & \(3.03\times 10^{-4}\) \\
2 & 8.56587 & 8.56588 & \(1.17\times 10^{-4}\) \\
3 & 16.63138 & 16.63126 & \(7.22\times 10^{-4}\) \\
4 & 13.03546 & 13.03559 & \(9.97\times 10^{-4}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Distance \(d\) values obtained by COMSOL and Equation (3) for four different examples. Figure 3: Refractive index vs. Wavelength for pure water and salt water at different temperatures. after which all are merged to form an input-output data set as seen in Table 3 where zero denotes pure water and one denotes salt water. Table 3 shows a fraction of the full data set defined as input/output data parameters used for training. The total number of rows is 3064. The data set's variables used in simulation are:  
1. Incident angle \(\theta_{i}\) from 0 to 45\({}^{\circ}\) with 0.5\({}^{\circ}\) step;
2. Air-water concentration \(W_{air}/W_{water}\) (cm) with six different configurations (15/5, 14/6, 13/7, 12/8, 11/9, 10/10);
3. Temperature \(T\) with three different configurations (30, 40, and 50 \({}^{\circ}\)C, respectively);
4. Wavelength \(\lambda\) with three different configurations (450, 520, and 660 nm, respectively). It is important to note that changing these variables will result in changes in the distance \(d\), and they will all combine to form an input data set for the two possible outputs 0/1 (pure water/salt water). Data set scaling is a common requirement for machine learning (ML) training. This is typically done by killing the mean and adjusting the difference in units. However, for some data sets, a negative impact on learning/training can be observed. In such cases, the medium and near range always give better results. As aforementioned, the first step is to limit or adhere to the proportional information best suited for controlling the size of the features or variables in the iterative cycle, such as the timeout vector in the background, for example, to avoid numerical risks due to cost variability. The standard scaler (MinMax) pre-processing capability within the sci-kit learn library is used to capture data set scatter to the quintile (min-max) range, by setting each element and simply scaling application insights to the boundaries of the sample information [59]. Centering and scaling are performed independently of each component by calculating the relevant sample statistics in the training set. The mean and standard deviations are stored for use in later conversion data. The neural network is simply a collection of many general units of neuron management. Each unit in the layer is linked to the next layer, applying the fact that the neural network is fully interconnected. The most important layer is the input layer, and its units capture the advantages of information. The last layer is the resulting layer, which contains one unit for each network output value. When the layers are assembled, each unit has a bias predisposition, and each pair of units in two contiguous layers has a specific weight. Subsequently, the network's calculations can be written by Equation (4) [60; 61].