検証データを使用して機械学習モデルを最適化し、過学習を防ぎ、ハイパーパラメータを調整し、堅牢な実世界のパフォーマンスを保証します。
検証データは機械学習開発ライフサイクルにおける重要なチェックポイントとして機能し、 トレーニング中のモデル性能評価に用いられる中間データセットである。アルゴリズムを学習させる主要データセットとは異なり、 検証セットはシステムが新規の未見情報へ一般化することをいかに効果的に学習しているかについて、 偏りのない推定値を提供する。 この特定の部分集合で指標を監視することで、開発者はモデルの構成を微調整し、 過学習(システムが基礎的なパターンを理解する代わりに トレーニング例を記憶してしまう現象)などの潜在的な問題を特定できます。 このフィードバックループは、現実世界で確実に機能する堅牢な人工知能(AI)ソリューションを構築するために不可欠です。
検証データの主な機能は、ハイパーパラメータの最適化を促進することである。モデルの重みなどの内部パラメータは学習プロセスを通じて自動的に学習される一方、学習率、バッチサイズ、ネットワークアーキテクチャなどのハイパーパラメータは手動で設定するか、実験を通じて発見する必要がある。
Validation data allows engineers to compare different configurations effectively via model selection. For example, if a developer is training a YOLO26 model, they might test three different learning rates. The version that yields the highest accuracy on the validation set is typically selected. This process helps navigate the bias-variance tradeoff, ensuring the model is complex enough to capture data nuances but simple enough to remain generalizable.
科学的厳密性を確保するため、完全なデータセットは通常、3つの異なるサブセットに分割される。 各サブセットの固有の目的を理解することは、効果的なデータ管理に不可欠である。
Ultralytics では、モデルの検証は効率化されたプロセスです。ユーザーがトレーニングや検証を開始すると、フレームワークは自動的にデータセットのYAML設定で指定された画像を使用します。これにより、平均精度(mAP)などの主要なパフォーマンス指標が計算され、ユーザーが物体検出やセグメンテーションタスクの精度を評価するのに役立ちます。
以下の例は、Pythonを使用してCOCO8 上で事前学習済みYOLO26モデルを検証する方法を示しています:
from ultralytics import YOLO
# Load the YOLO26 model (recommended for state-of-the-art performance)
model = YOLO("yolo26n.pt")
# Validate the model using the 'val' mode
# The 'data' argument points to the dataset config containing the validation split
metrics = model.val(data="coco8.yaml")
# Print the Mean Average Precision at IoU 0.5-0.95
print(f"Validation mAP50-95: {metrics.box.map}")
検証データは、精度と信頼性が不可欠である様々な産業において不可欠である。
In scenarios where data is scarce, setting aside a dedicated 20% for validation might remove too much valuable training information. In such cases, practitioners often employ Cross-Validation, specifically K-Fold Cross-Validation. This technique involves partitioning the data into 'K' subsets and rotating which subset serves as the validation data. This ensures that every data point is used for both training and validation, providing a statistically more robust estimate of model performance as described in statistical learning theory.
Effective use of validation data is a cornerstone of professional Machine Learning Operations (MLOps). By leveraging tools like the Ultralytics Platform, teams can automate the management of these datasets, ensuring that models are rigorously tested and optimized before they ever reach production.