Estimation of the trajectory of magnetic nanoparticles in non-newtonian vascular fluid with cancer through neuronal networks

Treatments to combat cancer seek to reach specific regions to ensure maximum efficiency and reduce the possible adverse effects that occur in the treatment. One of these strategies include the treatment with magnetic nanoparticles (NPM), which has presented promising results, however, aspects involved in the trajectory of the nanoparticles are not yet known. The aim of this work is estimating the behavior of NPM through supervised neural networks, for this, artificial neural networks were implemented, such as multilayer perceptron, with optimization algorithms in which the Levenberg Marquardt algorithm stands out, different trajectories of NPM were simulated, including parameters such as time, position in X and Y, the speed that the nanoparticles can reach and physical factors that interact in the distribution were considered, such as the gravitational field, the magnetic field, the Stokes force, the force of pushing and dragging with different values of viscosity in the blood, generating a database with optimized reaction times that allows a more accurate prediction. The architecture obtained with the artificial neural the network that contains the optimization algorithm [5 4 3 2], presented the best performance with a training MSE of 1.763E-07, a validation uRMSE of 0.0049, and trend probabilities of X 0.62 % and 0.576 % in Y.


Introduction
In most cases, the efficacy of a drug is reduced depending on a number of physical, chemical, biological, and sociocultural factors, for which a totally satisfactory effect is not achieved in the body as expected during treatment [1]. In general, cancer patients face problems after chemotherapy and in the same way adverse side effects of radiotherapy, since these do not distinguish between healthy and cancerous cells, thus reducing the quality of life of the patient. Adverse effects mean that when the patient has received several cycles of chemotherapy, their quality of life notably decreases from the physiological and psychological aspects [2].
Nanoparticles can carry and direct drugs in particular regions of the body, therefore it is necessary to determine the trajectories of these within the bloodstream. The aim of this work is to determine the trajectories of the magnetic nanoparticle (MPN) in the circulatory system, generating a database with values present within the simulation such as positions and velocities in order to analyze the behavior of these vehicles in order to generate a neural network.

Mathematical analysis of ANN variables
A numerical method was designed that allowed simulating and analyzing the behavior of the trajectory of a nanoparticle, an approximation of a non-Newtonian flow, taking into account the gravitational field, magnetic field, Stokes force, thrust force, drag force, considering a numerical model, viscosity was considered as a factor that will directly influence the trajectory of the NPMs through the circulatory system due to temperature, stress shear and deformation gradient [3], for which the numerical model must correspond to a second-order differential equation of non-separable variables, which will be used by computational methods due to its high complexity.
Therefore, in the present work, a mathematical model is developed to describe the trajectory of a MPN in a coronary artery with the help of a local magnetic field applied through a cylindrical magnet placed outside the body with different distances [4]. In order to generate information with different parameters, which have a high content of randomness, which allow a correct training of the neural algorithm. The MPNs flow along the axis of the blood vessel and the magnetic field is applied perpendicular to the direction of blood flow, generating a twodimensional plane where the nanoparticle can be analyzed in the X and Y axes that indicate its position in time, with the velocities in each axis, as shown in figure 1. The second-order differential equations of non-separable variables developed for the model were solved using the Euler Chrome method by means of a C++ code to determine the trajectories of the magnetic nanoparticles within a blood vessel [3]. The model is also used to optimize the position of the external magnet for capturing the magnetic nanoparticles at the tumor site in order to optimize the drug [5]. The blood has been considered as a non-Newtonian flow, that is, it depends on certain factors that cause its viscosity to vary, in particular the temperature, therefore, the rheological model that best adjusts to the behavior was selected in this case, Casson's [6], whose parametric equation is given by With the exponential decay of viscosity as temperature increases, it is essential to recognize that the viscosity of a human being varies as a function of body temperature ( fig. 2), so, it is a parameter that provides information on the behavior of the position and velocities of the MNP. The gravitational field, the magnetic field generated by the magnet, in addition to the Stokes force, the thrust force, and the drag force, were taken into consideration for the development of the equations that describe the motion, however, it was not included Brownian motion because its contribution is minimal when the particles are very small [7]. The magnetic field to which the MPNs are subjected is expressed as: The components of the magnetic field for an infinite cylindrical magnet, which is magnetized perpendicular to its axis, can be represented within the blood vessel as shown below [4].
The components of the magnetic force are given by: We consider that x d 1 so the distance from the magnet to the blood vessel is much larger than the diameter of the blood vessel itself and x p 1. Therefore, the components of magnetic force reduces to: Pushing force: Buoyancy force: Therefore the pushing force can be written as: Where ρ npm y ρ s are the density of the MPN and the fluid respectively and g = 9.8m/s 2 the acceleration of gravity.
Taking into account the previous study of the physics involved between the interaction of the MPN and the vascular fluid under the presence of the magnetic field, we arrive at the equations of motion.
Next, the logical sequence of the Euler-Cromer method implemented for solving the secondorder differential equations of non-separable variables (21) and (22) is specified: The index i refers to the current step while i+1 refers to the next step. To get the new position (r i+1 ) it is necessary to use the new speed (u i+1 ).The prediction made by the neural networks allows the continuous estimation of the positions and speeds through which the NPMs move so that an estimate of their position can be made. After running the code to solve differential equations (21) and (22), it was possible to build a database with more than 150,000 data, after which we proceed with the assembly of the neural network fed from the database.

Nanoparticle path sample space
The stochastic experiment that is analyzed in this document is the prediction of the trajectory of the nanoparticle, which will be possible by the analysis of different variables such as time, the position in X and Y, adding the different speeds that are presented by various physical factors, that interact in the distribution, such as the gravitational and magnetic field, Stokes force, thrust and drag force with different values of viscosity in the blood, the sample space of the experiment is shown in Ω = T ime, P os x , V el x , V el y , P os y .
Where is generated an event A that contains the auxiliary variables and an event B that contains the main variables, as in A = T ime, V el x , V el y and B = P os x , P os y . A ⊂ Ω and B ⊂ Ω, so there is a field F, which is a class of the subset of Ω and satisfies the following axioms: The power set is |P (s)| = 2 Ω = 2 5 = 32. And the cardinality of the global space is 5, because there are five visible parameters for the analysis of the neural network. Each parameter has its own set as follows: Time: It has a set of 19 values that starts at 0 seconds to 9 seconds. T ime = 0, 0.5, 1, ..., 9. And it has a cardinality of 19 with a power space of: |P (s)| = 2 Ω = 2 19 . Position X: It has a set of 2 values that indicate whether the nanoparticle goes north or south. The analysis of different neural architectures was carried out, starting with zero hidden layers with five neurons, and then varying them and reaching three hidden layers with 34 neurons, two training algorithm was evaluated, the Gradient descent algorithm and the Levenberg-Marquadt algorithm, the first is best used when the parameters can not be calculated analytically and the second was developed to solve nonlinear least-squares problems.

Results
The table 1, and 2 displays the size of the architecture, the number of neurons, the MSE, the RMSE, R, P T X and P T Y .

Gradient descent algorithm
The best architecture developed with the Gradient descent algorithm was ARC [10 7 5 2] which presented a validation RMSE error of 0.0355 %, indicates the prediction signal referring to the position of the nanoparticle in the X and Y axis. The behavior of the neural network was evaluated with the linear regression coefficient, with the probabilities of trends that denote the probability of change in the output predicted by the neural network, where it was visualized that the best architecture obtained [10 7 5 2], had a coefficient R of 0.7488, a probability of trend in X of 71.9 % and a probability of trend in Y of 64.0 %. Table 1. Architecture with the "traingd" training algorithm and the "logsig" activation functions and secondary analysis parameters to detail the artificial neural network. SIZE NEURONS MSE (%) RMSE (%) R P T X (%) P T Y (%) ( 2 1 2 In figure 3 the training, validation, and prediction signal can be observed, the output of the architecture [10 7 5 2], manages to predict the changes in the behavior of the trajectory at position X and Y of the nanoparticle. The prediction signal detects the changes in the validation signal, achieves some synchronization with the validation signal. The prediction detects the changes of the validation signal with a more notable lag than in X, but manages to change with more precision although it is not capable of reaching the maximum and minimum values, at the end of the simulation the prediction signal achieves certain synchrony with the validation signal.

Levenberg Marquadt algorithm
The behavior developed with the neural architectures that were trained with the Levenberg Marquadt algorithm, is observed in  which presented a training MSE of 1.763E-07 % and an RMSE of 0.004 %, the coefficient R is 1, the probability of trend in X is 62.9 % and the probability of trend in Y is 57.6 %. Analysis of the behavior of the error generated in the training and the error generated in the validation of the neural architectures with the training of the gradient descent algorithm is carried out with respect to the number of neurons used (table 2). In the figure 4 it can be seen that the architecture [5 4 3 2], manages to accurately predict the changes in behavior, it can be seen that the prediction detects the changes in the validation signal precisely, showing that the network is able to predict the behavior of the nanoparticle in X and it can be seen that the prediction detects the changes in the validation signal accurately, showing that the network is able to predict the behavior of the nanoparticle in Y.  figure 5 it was observed that the training error MSE decreased significantly as the number of neurons increased and in the case of the validation error it was observed that the best behavior of the validation error was in the architecture [5 4 3 2] where there was an RMSE error of 0.49 %, it was also observed that the error decreased until it reached 13 neurons, then it remained stable until 24 neurons and subsequently had a slight increase when it reached 26 neurons.

Conclusions
The best artificial neural architecture found with the Levenberg Marquardt training algorithm was [5 4 3 2], which had an MSE error of 1.763E-07 %, an RMSE error of 0.0049 % with an R of 1, appending a probability of trend in X of 62.9 %, and a probability of trend in Y of 57.6 %. This neural network manages to predict the behavior of the trajectory of the nanoparticle, which demonstrates a approach to the numerical method designed and the analysis developed with the different variables, which allowed development of the data used to parameterize the neural network, as is the case of the positions in X and Y, with the speeds and time of the nanoparticle. As future work, it is proposed to include data with new parameters as input.