

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 特徴量属性ドリフト違反をモニタリングする
<a name="clarify-model-monitor-model-attribution-drift-violations"></a>

特徴量属性ドリフトジョブは、[ベースライン設定](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelExplainabilityJobDefinition.html#sagemaker-CreateModelExplainabilityJobDefinition-request-ModelExplainabilityBaselineConfig)によって提供されるベースライン制約を、現在の `MonitoringExecution` の分析結果と照らし合わせて評価します。違反が検出されると、ジョブはその違反を実行出力場所の constraint\$1violations.json ファイルに一覧表示し、実行ステータスを [結果の解釈](model-monitor-interpreting-results.md) としてマークします。**

特徴量属性ドリフト違反ファイルのスキーマは次のとおりです。
+ `label` — ラベルの名前、ジョブ分析設定、`label_headers` またはプレースホルダーの名前 (`"label0"` など)。
+ `metric_name` — 説明可能性分析メソッドの名前。現在は、`shap` のみがサポートされます。
+ `constraint_check_type` — モニタリング対象の違反のタイプ。現在は、`feature_attribution_drift_check` のみがサポートされます。
+ `description` — 違反を説明する説明メッセージ。

```
{
    "version": "1.0",
    "violations": [{
        "label": "string",
        "metric_name": "string",
        "constraint_check_type": "string",
        "description": "string"
    }]
}
```

*モニタリングジョブは、`explanations` セクションの各ラベルについて、ベースライン制約ファイルおよびジョブ分析結果ファイル (analysis.json) 内のグローバル SHAP 値の [nDCG スコア](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.ndcg_score.html)を計算します。*スコアが 0.9 未満の場合、違反が記録されます。グローバル SHAP 値の合計が評価されるので、違反エントリには `“feature”` フィールドがありません。次の出力は、記録された複数の違反の例を示しています。

```
{
    "version": "1.0",
    "violations": [{
        "label": "label0",
        "metric_name": "shap",
        "constraint_check_type": "feature_attribution_drift_check",
        "description": "Feature attribution drift 0.7639720923277322 exceeds threshold 0.9"
    }, {
        "label": "label1",
        "metric_name": "shap",
        "constraint_check_type": "feature_attribution_drift_check",
        "description": "Feature attribution drift 0.7323763972092327 exceeds threshold 0.9"
    }]
}
```