## 3 Results
### AI and ML for Rehabilitation Systems  
#### 3.3.1 AI Algorithms and Machine Learning for Personalized Rehabilitation and Recovery Prediction  
The continued prevalence of neurological and musculoskeletal disorders has highlighted the urgent need for innovative and effective rehabilitation methods. Traditional approaches often lack personalization, objective progress assessments, and the necessary tools to maintain patient motivation in the long term. To address these issues, the field of rehabilitation technology is rapidly developing, with ML and VR playing a key role. One area where these technologies have proven particularly useful is stroke rehabilitation, as restoring patients' physical and cognitive functions requires precise, adaptive, and scalable solutions. Existing machine learning models show potential in rehabilitation but suffer from their scalability issues and limited ability to adapt to dynamic rehabilitation data, as they underutilize performance metrics such as completion and error rates, resulting in generalized rather than personalized treatment plans [43]. In response to these limitations, an optimized Bi-LSTM model using Firefly Optimization (FFO) was proposed. The proposed optimized FFO-Bi-LSTM model improves the accuracy, speed, and adaptivity by using Firefly Optimization to tune hyperparameters such as the learning rate and batch size, which is critical for real-time rehabilitation. FFO helps the model generalize to different patient states after a stroke. A statistical analysis of rehabilitation performance was conducted to compare deep learning and machine learning methods, as shown in Tables 3 and 4. The analysis presents critical performance metrics, including the accuracy, recall, precision, and F1-score, providing a clear evaluation of their effectiveness. These results help establish the strengths and limitations of different predictive models within the rehabilitation domain, confirming the superior performance of the optimized FFO-Bi-LSTM model, which achieved a 99.06% accuracy, as indicated in Table 3. VR complements this approach by simulating real-world tasks in a controlled environment and providing data on the patient's motor skills, cognitive functions, and physical responses, allowing FFO-Bi-LSTM to dynamically adapt the intensity of the therapy [44]. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Methods** & **Accuracy** & **Recall** & **Precision** & **F1-Score** & \begin{tabular}{c} **Training/** \\ **Validation** \\ \end{tabular}  & **Dataset Composition** & \ \begin{tabular}{c} **Provenance/** \\ **Accessibility** \\ \end{tabular}  & **Reference** \\ \hline Proposed & & & & & & & Private/Institutional & \\ FFO-BI-LSTM & 99.06 & 99.65 & 99 & 99.20 & Not reported & Only illustrative values & \begin{tabular}{c} (Real-time VR \\ \end{tabular}  \\  & & & & & & are shown & & \\  & & & & & & & & the authors’ lab & \\  & & & & & & & & gender: 46.6\% M, \\  & & & & & & 53.4\% F; conditions: & & (IMU-sensor data \\  & & & & & & & & \\  & & &  
ML has also been used in core muscle rehabilitation and preoperative assessments via mobile accelerometer data. A computational methodology combining signal processing, feature extraction, and classification achieved a 90.6% accuracy in differentiating motion patterns, as shown by the data in Table 4 [48]. Another important aspect of technology development in healthcare is monitoring the recovery of patients after surgery, in particular after a total knee replacement (TKR). This area makes extensive use of inertial measurement units (IMUs) and trained classification models to track recovery dynamics based on a biomechanical data analysis during activities such as walking and stair climbing. While subjective patient assessments remain important, objective data generated by ML can provide additional valuable information about the recovery process and facilitate the development of more individualized rehabilitation approaches [49].