## 3 Results
### Optimal Imaging Stimulant Results
``` import numpy as np import tensorflow as tf from tensorflow.keras import layers, models from sklearn.model_selection import train_test_split speeds = np.array([0.5, 3.1, 0.1]) distances = np.array([10, 65, 5]) sizes = np.array([5, 30, 5]) speed_distance_size_combinations = np.array( np.meshgrid(speeds, distances, sizes) ).Treshape(-1,3) effectiveness_scores = [] for speed, distance, size in speed_distance_size_combinations: if 1 <= speed <= 2 and 30 <= distance <= 45 and 10 <= size <= 20: score = np.random.uniform(80, 100) else: score = np.random.uniform(20, 80) effectiveness_scores_append(score) X = speed_distance_size_combinations y = np.array(effectiveness_scores) X_min = Xmin(axis = 0) X_max = X_max(axis = 0) X_normalized = (X - X_min)/(X_max - X_min) X_train, X_test, y_train, y_test = train_test_split( X_normalized, y, test_size = 0.2, random_state = 42 ) model = models.Sequential([  layers.Dense(64, activation ='relu', input_shape = (3),)), layers.Dense(64, activation ='relu'), layers.Dense(1) ) model.compile( optimizer = 'adam', loss ='mean_squared_error', metrics = ['mae'] ) history = model.fit X_train, y_train, epochs = 100, batch_size = 8, validation_split = 0.2, verbose = 0 test_loss, test_mae = model.evaluate(X_test, y_test, verbose = 0) print(f\"Test Loss: {test_loss.4f}, Test MAE: {test_mae:4f}\") full_range_normalized = (speed_distance_size_combinations - X_min)/(X_max - X_min) predicted_effectiveness = model.predict(full_range_normalized) optimal_index = np.argmax(predicted_effectiveness) optimal_speed, optimal_distance, optimal_size = speed_distance_size_combinations[optimal_index] optimal_effectiveness = predicted_effectiveness[optimal_index] print(\").Optimal Parameter Combination:\") print(f\"Speed: {optimal_speed:2f}, Distance: {optimal_distance:2f}, Size: {optimal_size.2f}\") print(f\"Predicted Effectiveness: {optimal_effectiveness [0]-2f}\")In this model, the input layer was set to input_shape = (3) to accept the three variables (speed, distance, size), followed by ReLU for nonlinear transformation and feature extraction, harnessing ANN's capability for nonlinear modeling. Two hidden layers were used, with each layer containing 64 neurons (layers.Dense(64, activation ='relu')), to capture multilayer characteristics. To determine the PES for various parameter combinations, np.argmax(predicted_effectiveness) was used to identify the highest effectiveness index, while normalization (X_normalized = (X - X_min)/(X_max - X_min)) was applied to address imbalances in variable scales. The output layer generated the PES values after processing 2,860 parameter combinations. The top 50 combinations with the highest PES values are presented in Table 1.

\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**No. **} & **Speed** & **Distance** & \multirow{2}{*}{**Size**} & **PES** & **Normalized** & \multirow{2}{*}{_\(p\)-Value_} \\  & **(Hz)** & **(Yixel)** & & & **(\%)** & **Regression** & \\ \hline
1 & 1.8 & 1440 & 70 & 98.7 & 0.987 & 0.0001 \\ \hline
2 & 1.9 & 13



Analysis of the results revealed that the optimal configuration was achieved with a speed of 1.8 Hz, a distance of 1440 px, and a circle size of 70 px. A frequency of 1.8 Hz corresponds to a cycle duration of 555.56 ms. The distance of 1440 px is equivalent to 381 mm, and a circle size of 70 px equals 18.5 mm. Figure 3 displays a scatter plot illustrating the optimized parameter distribution by speed, distance, and size. The data in Figure 3 highlight the three optimal visual stimulus configurations for EMDR, as proposed by the AIP model and ANN analysis. As shown in the left plot, an increase in speed from approximately 1.0 to 2.0 Hz is associated with a steady rise in predicted effectiveness scores, suggesting an optimal range near 2.0 Hz. The middle plot \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**No.** & **Speed (Hz)** & **Distance (Pixel)** & **Size** & **PES (\%)** & **Normalized Regression** & _p-Value_ \\ \hline



\hline \end{tabular}
\end{table}