Yolo 비전 선전
선전
지금 참여하기
용어집

정확도

머신러닝에서 정확도의 중요성, 계산 방법, 불균형 데이터세트의 제한 사항 및 모델 성능을 개선하는 방법을 알아보세요.

Accuracy serves as a fundamental benchmark in the evaluation of artificial intelligence systems, quantifying the percentage of correct predictions a model makes relative to the total number of predictions. In the context of machine learning and specifically supervised learning, this metric provides a high-level snapshot of how effectively an algorithm aligns with the ground truth provided during the training process. While it is the most intuitive measure of performance—answering the simple question, "How often is the model right?"—it acts as a primary indicator of a system's reliability before developers dive into more granular metrics.

The Nuance of Evaluating Performance

While accuracy is an excellent starting point, it is most effective when applied to balanced training data where all classes are represented equally. For example, in a standard image classification task distinguishing between cats and dogs, if the dataset contains 500 images of each, accuracy is a trustworthy metric. However, challenges arise with imbalanced datasets, leading to the "accuracy paradox."

If a model is trained for fraud detection where only 1% of transactions are fraudulent, a model that simply predicts every transaction as "legitimate" would achieve 99% accuracy while failing completely at its intended task. To mitigate this, engineers often use the Ultralytics Platform to visualize dataset distribution and ensure models are not simply memorizing the majority class.

Distinguishing Accuracy from Related Terms

To fully understand model performance, it is crucial to differentiate accuracy from similar metrics:

  • Precision: This measures the quality of positive predictions. It asks, "Of all the instances predicted as positive, how many were actually positive?"
  • Recall: Also known as sensitivity, this measures the model's ability to find all relevant cases. It asks, "Of all the actual positive instances, how many did the model correctly identify?"
  • F1-Score: This is the harmonic mean of precision and recall, providing a single score that balances the two, which is particularly useful for uneven class distributions.

While accuracy provides a global view of correctness, precision and recall offer insights into specific types of errors, such as false positives or false negatives.

실제 애플리케이션

The utility of accuracy extends across diverse industries, validating the reliability of computer vision and predictive models in critical environments.

  • Medical Diagnostics: In the field of medical image analysis, models are used to classify X-rays or MRI scans. A model classifying scans as either "healthy" or "pathological" relies on high accuracy to ensure patients receive correct diagnoses. Innovations in AI in healthcare heavily depend on rigorous validation to minimize automated errors.
  • Quality Control in Manufacturing: Automated systems in smart manufacturing use visual inspection to identify defects on assembly lines. High accuracy ensures that only defect-free products are shipped, reducing waste and warranty costs. By employing object detection to spot flaws, factories maintain production standards automatically.

Measuring Accuracy in Code

In practical scenarios using Python, developers can easily measure the accuracy of a model using established libraries. The following example demonstrates how to validate a YOLO26 classification model to obtain its top-1 accuracy. Top-1 accuracy refers to the frequency with which the model's highest-probability prediction matches the correct label.

from ultralytics import YOLO

# Load a pre-trained YOLO26 classification model
model = YOLO("yolo26n-cls.pt")

# Validate the model on a standard dataset (e.g., MNIST)
metrics = model.val(data="mnist")

# Print the Top-1 Accuracy
print(f"Top-1 Accuracy: {metrics.top1:.4f}")

개선 전략

When a model suffers from low accuracy, several techniques can be employed to enhance performance. Engineers often utilize data augmentation to artificially increase the diversity of the training set, preventing the model from overfitting. Additionally, hyperparameter tuning—adjusting settings like the learning rate—can significantly impact convergence. For complex tasks, transfer learning allows a model to leverage knowledge from a large, pre-trained dataset (like ImageNet) to achieve higher accuracy on a smaller, specific dataset.

Ultralytics 커뮤니티 가입

AI의 미래에 동참하세요. 글로벌 혁신가들과 연결하고, 협력하고, 성장하세요.

지금 참여하기