## 5 Edge AI for Early Health Prediction
### Prediction of Future Health Outcomes
#### 5.3.5 Evaluation Metrics of Edge AI Algorithms  
Various metrics are commonly employed to assess the efficacy of Edge AI algorithms. The key metrics of utmost significance include the following:  
* _Accuracy_. Accuracy refers to the measure of how well the algorithm performs in correctly identifying or classifying data in the edge devices or edge computing systems. It quantifies the level of agreement between the algorithm's predictions and the ground truth or desired outcomes. * _Precision and Recall._ Precision and recall are two important metrics used to evaluate the performance of classification models. They provide insights into how well the algorithm is identifying and classifying data at the edge devices or edge computing systems. Precision measures the accuracy of positive predictions made by the algorithm. It is the ratio of true positives (correctly predicted positive instances) to the sum of true positives and false positives (incorrectly predicted positive instances). In other words, precision indicates the proportion of correctly identified positive instances out of all the instances predicted as positive. A higher precision value indicates a lower rate of false positives. Recall, also known as sensitivity or the true positive rate, measures the algorithm's ability to correctly identify positive instances. It is the ratio of true positives to the sum of true positives and false negatives (positive instances incorrectly classified as negative). Recall represents the proportion of correctly identified positive instances out of all the actual positive instances. A higher recall value indicates a lower rate of false negatives. * _Intersection over Union (IoU)._ The IoU metric is particularly useful in evaluating the performance of object detection algorithms. It helps assess how well the algorithm accurately localizes and identifies objects within an image or video frame. By comparing the predicted and ground truth regions, IoU provides insights into the algorithm's ability to detect and segment objects accurately. It is used in Edge AI algorithms dealing with visual data to measure the overlap between the predicted bounding box or region and the ground truth bounding box or region in object detection and segmentation tasks. It provides a quantitative measure of the accuracy of the algorithm's predictions. IoU is calculated by dividing the area of intersection between the predicted and ground truth regions by the area of their union. The resulting value indicates the extent of overlap between the two regions. A higher IoU value indicates a better match between the predicted and ground truth regions. IoU is often used as a threshold to determine whether a predicted bounding box or region is considered a true positive or a false positive. If the IoU value exceeds a certain threshold (commonly 0.5 or 0.7), the prediction is considered a true positive. Otherwise, it is classified as a false positive. * _Latency._ Latency in Edge AI algorithms refers to the time it takes for an algorithm to process input data and produce an output on edge devices or edge computing platforms. It is a measure of the delay or response time experienced during the execution of the algorithm. In the context of Edge AI, latency is a critical factor as it directly impacts the real-time performance and responsiveness of the system. Edge devices, such as smartphones, IoT devices, or edge servers, often have limited computational resources compared to cloud-based servers. This constraint can lead to a higher latency in executing AI algorithms on the edge. The latency in Edge AI algorithms depends on various factors, including the complexity of the algorithm, the computational power of the edge device, data processing requirements, and network connectivity. The goal is to minimize latency to ensure efficient and timely decision making at the edge.