namb_nam
09/03/2025, 2:40 AMkapa.ai
09/03/2025, 2:40 AMkapa.ai
09/03/2025, 2:40 AMyaml models: - name: <model名> tests: - elementary.volume_anomalies: timestamp_column: <日付カラム名> time_bucket: period: day count: 1 training_period: period: day count: 30 detection_period: period: day count: 1 - `timestamp_column`:日付を示すカラム名を指定 - `time_bucket`:1日ごとにバケット化 - `training_period`:過去30日間をトレーニングデータとして使用 - `detection_period`:直近1日(最新日)を異常検知対象にする この設定で、過去30日間のレコード件数を基準に、最新日の件数の異常を検知します [volume_anomalies 設定詳細](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/volume-anomalies#test-configuration) --- ### 2. 特定カラムの値(column_anomalies) yaml models: - name: <model名> columns: - name: <カラム名> tests: - elementary.column_anomalies: timestamp_column: <日付カラム名> time_bucket: period: day count: 1 training_period: period: day count: 30 detection_period: period: day count: 1 - `column_anomalies`:監視したいカラム名を指定 - 他のパラメータはvolume_anomaliesと同様 この設定で、特定カラムの値に対しても過去30日間を基準に最新日の異常を検知できます [column_anomalies 設定詳細](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/column-anomalies#test-configuration) --- #### 注意点 - `timestamp_column`は必ず日付型で、連続してデータが存在することを確認してください。 - テストは「完了したバケット」に対してのみ実行されるため、当日分は翌日以降に検知対象となります [volume_anomaliesの説明](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/volume-anomalies) --- ご参考になれば幸いです。namb_nam
09/03/2025, 3:06 AMkapa.ai
09/03/2025, 3:06 AMkapa.ai
09/03/2025, 3:07 AM