# 学習済み Models を評価

モデル評価では、以下が表示されます:

1. 本番環境のメトリクス エクスプローラー。モデルを実行する最適な confidence threshold を見つけるのに役立ちます。
2. モデル改善の推奨事項。モデルの精度を向上させる方法の提案が表示されます。
3. クラス別のパフォーマンス。モデルが各クラスをどれだけ正しく識別しているかを示します。
4. confusion matrix。モデルが得意なクラスと苦手なクラスを特定するために使用できます。
5. 対話型の vector explorer。モデルの精度が高い画像クラスターや低い画像クラスターを特定できます。

model evaluation を使うことで、モデルの改善点を特定できます。

model evaluations は、課金ユーザーが Roboflow に学習またはアップロードした、すべての versioned models に対して自動的に実行されます。数百枚の画像からなる dataset では evaluation の実行に数分かかる場合があり、数千枚以上の画像を含む大規模な dataset では数時間かかる場合があります。

### Model Evaluation を開く

モデルの confusion matrix と vector explorer を確認するには、project 内の任意の trained model version を開きます。次に、「View Evaluation」ボタンをクリックします:

<figure><img src="/files/690cce118fc7efb2f23f72899b3b197597d38f59" alt=""><figcaption></figcaption></figure>

ウィンドウが開き、confusion matrix と vector analysis を確認できます。

### Production Metrics Explorer

production metrics explorer は、あらゆる confidence threshold におけるモデルの Precision、Recall、F1 score を表示します。この情報はグラフで示されます。

これらの統計に基づいて、production metrics explorer は「optimal confidence」を推奨します。これは、Precision/Recall/F1 Score のトレードオフが最も良くなる threshold です。

model evaluation が完了すると、推奨された optimal confidence threshold が自動的にモデルの inference requests のデフォルトとして適用されます。クラスごとの threshold が利用できる場合はそれも適用され、各クラスに独自の値がない場合は global threshold がフォールバックとして使用されます。

個々の inference request については、 `confidence` パラメータを明示的に渡すことで、confidence threshold を上書きできます。

<figure><img src="/files/b93440f3d39a95bd663e92b881e1bea8fc985ee4" alt=""><figcaption></figcaption></figure>

スライダーをドラッグすると、異なる confidence thresholds での F1/Precision/Recall の値を確認できます:

<figure><img src="/files/826d1108c4c4a964d85f79fc02ac73d157b9cc3a" alt=""><figcaption></figcaption></figure>

### モデル改善の推奨事項

model evaluation の model improvement recommendations セクションには、モデルの精度を向上させる方法の提案が一覧表示されます。これらの改善案は、モデルで計算された confusion matrix の結果に基づいています。（confusion matrix の詳細は、このページの後半で説明します）。

model improvement recommendations 機能では、以下に関する提案を行うことができます:

* false negative が多いモデルを改善する方法。
* false positive が多いモデルを改善する方法。
* どのクラスがよく混同されるか（誤識別されるか）。
* 精度向上のために、どのクラスにより多くのデータが必要か。
* テストセットまたは validation set が小さすぎる可能性がある場合。
* その他。

<figure><img src="/files/603394ab0ee0cbc730976e5553fbc109a43b4ef3" alt=""><figcaption></figcaption></figure>

### クラス別パフォーマンス

performance by class チャートは、dataset 内の全クラスにわたる正しい予測、誤分類、false negative、false positive の数を示します。

この情報を使えば、どのクラスをモデルがうまく識別でき、どのクラスの識別が苦手かを一目で確認できます。

<figure><img src="/files/3061ae117c0cddba253f8bb90a741c34e4ced9a5" alt=""><figcaption></figcaption></figure>

dataset に多数のクラスがある場合は、「All Classes」ドロップダウンを開き、強調表示したいクラスを選択することで、チャートを特定のクラスに絞り込めます:

<figure><img src="/files/6f35b08b2e67c0eaf41b12fb78415f42c3fa81d2" alt=""><figcaption></figcaption></figure>

Confidence Threshold スライダーを動かすことで、このチャートが異なる confidence thresholds でどのように変化するかも確認できます:

<figure><img src="/files/cafa3bf89717ad99cb20640ea219a16fa4dd54a6" alt=""><figcaption></figcaption></figure>

既定では、このチャートは推奨された optimal confidence threshold を使用します。

### Confusion Matrix

confusion matrix は、さまざまなクラスに対してモデルがどれだけうまく動作するかを示します。

confusion matrix は、学習済みモデルで test set と validation set の画像を実行して算出されます。その後、モデルの結果は dataset のアノテーションにある「ground truth」と比較されます。

confusion matrix ツールを使うと、以下を特定できます:

* モデルがうまく機能しているクラス。
* モデルがオブジェクトに対して誤ったクラスを識別しているクラス（false positives）。
* 存在しないオブジェクトをモデルが検出しているケース（false negatives）。

以下は confusion matrix の例です:

<figure><img src="/files/c85cb713ec3fd75e22c3a41623dc5d4f1551d552" alt=""><figcaption></figcaption></figure>

モデルが多くのクラスを検出する場合は、スクロールバーが表示され、confusion matrix を移動できます。

既定では、confusion matrix はモデルに対して計算された optimal threshold で実行した場合のパフォーマンスを表示します。

Confidence Threshold スライダーを使って confidence threshold を調整できます。スライダーを設定すると、confusion matrix、precision、recall が更新されます:

<figure><img src="/files/3b1a302cc17d2f4836d4dc5c460ddc88f69f93df" alt=""><figcaption></figcaption></figure>

confusion matrix の各 बॉक्सをクリックすると、対応するカテゴリにどの画像が含まれるかを確認できます。

たとえば、「False Positive」列の任意の बॉक्सをクリックすると、ground truth データには存在しないオブジェクトが検出された画像を特定できます。

<figure><img src="/files/540463031945e541fa5e1c38e8f1a0cdf3b02c4e" alt=""><figcaption></figcaption></figure>

個々の画像をクリックすると対話型ビューに入り、ground truth（アノテーション）と model predictions を切り替えられます:

<figure><img src="/files/195b978564fd0d62470c3181b2dd4c00192261b7" alt=""><figcaption></figcaption></figure>

「Ground Truth」をクリックするとアノテーションを表示し、「Model Predictions」をクリックするとモデルの出力を表示します。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-jp/train/evaluate-trained-models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
