

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 可解釋性報告
<a name="image-classification-explainability-report"></a>

Amazon SageMaker Autopilot 提供可解釋性報告，協助說明最佳模型候選項目如何預測影像分類問題。本報告可協助機器學習 (ML) 工程師、產品經理和其他內部利害關係人了解模型的特性。消費者和監管機構都仰賴機器學習的透明度來信任和解譯在模型預測上做出的決定。您可以使用這些說明來稽核和符合法規要求、建立對模型的信任、支援人為決定，以及偵錯和改善模型效能。

影像分類的 Autopilot 說明功能使用視覺化類別啟用地圖 (CAM) 方法來產生熱度圖，其中每種色彩的分佈和強度都會突顯影像中對特定預測最有貢獻的區域。這種方法有賴於從 [Eigen-CAM](https://arxiv.org/ftp/arxiv/papers/2008/2008.00299.pdf) 的實作衍生的主體元件。

Autopilot 產生 JSON 檔案格式的可解釋性報告。報告包含基於驗證資料集的分析詳細資訊。用於產生報告的每個影像都包含下列資訊：
+ `input_image_uri`：作為熱度圖輸入的輸入影像的 Amazon S3 URI。
+ `heatmap_image_uri`：Autopilot 產生的熱度圖影像的 Amazon S3 URI。
+ `predicted_label`：Autopilot 訓練的最佳模型預測的標籤類別。
+ `probability`：預測 `predicted_label` 的信賴度。

您可以在 `[BestCandidate.CandidateProperties.CandidateArtifactLocations.Explainability](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CandidateArtifactLocations.html#sagemaker-Type-CandidateArtifactLocations-Explainability)` 上的 `[DescribeAutoMLJobV2](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html)` 回應中，找到針對最佳候選項目產生之可解釋性成品的 Amazon S3 字首。

以下範例說明了來自 [Oxford-IIIT 寵物資料集](https://www.robots.ox.ac.uk/~vgg/data/pets/)的幾個樣本的熱度圖的外觀。熱度圖影像會顯示顏色漸層，指出影像中不同特徵的相對重要性。與藍色區域表現的特徵相比，紅色區域的特徵在預測輸入影像的 "predicted\$1label" 時更為重要。


****  

| 輸入影像 | 熱度圖影像 | 
| --- | --- | 
|  ![\[原始的狗圖像。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/autopilot/autopilot-image-classification-explainability-img1-input.png)  |  ![\[狗圖像的熱度圖，突顯對預測標籤的貢獻更大的區域。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/autopilot/autopilot-image-classification-explainability-img1-output.png)  | 
|  ![\[原始的貓圖像。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/autopilot/autopilot-image-classification-explainability-img2-input.png)  |  ![\[貓圖像的熱度圖，突顯對預測標籤有更大貢獻的區域。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/autopilot/autopilot-image-classification-explainability-img2-output.png)  | 