{"ref":{"kind":"component","id":"aml_activity","key":"sha256:1449325641b28dd7b77277a700884d9a5c51e8b1cf52760c9ca2eef5a064045a"},"label":"Activity","description":"Compare reported activity with expected geography and the exposure threshold.","inputs":[{"label":"Expected Geographies","name":"expected_geographies","valueType":{"axes":[{"extent":null,"name":"expected_geography","variable":true}],"dtype":"str","unit":"text"}},{"label":"High Exposure Threshold","name":"high_exposure_threshold","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Observed Amount","name":"observed_amount","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Observed Count","name":"observed_count","valueType":{"axes":[],"dtype":"f64","unit":"count"}},{"label":"Observed Geography","name":"observed_geography","valueType":{"axes":[],"dtype":"str","unit":"text"}}],"outputs":[{"label":"Alert Exposure Per Event","name":"alert_exposure_per_event","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"High Exposure Flag","name":"high_exposure_flag","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"New Geography Mismatch","name":"new_geography_mismatch","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Observed Geography Expected","name":"observed_geography_expected","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Ready","name":"ready","valueType":{"axes":[],"dtype":"f64","unit":"flag"}}],"dependencies":[],"libraries":["aml_model"],"notes":{},"calculation":{"nodes":[{"id":"input-expected_geographies","label":"Expected Geographies","kind":"input"},{"id":"input-high_exposure_threshold","label":"High Exposure Threshold","kind":"input"},{"id":"input-observed_amount","label":"Observed Amount","kind":"input"},{"id":"input-observed_count","label":"Observed Count","kind":"input"},{"id":"input-observed_geography","label":"Observed Geography","kind":"input"},{"id":"step-high_exposure_flag","label":"High Exposure Flag","kind":"step","rule":"(Observed Amount > High Exposure Threshold)","sources":[{"node":"input-observed_amount"},{"node":"input-high_exposure_threshold"}]},{"id":"output-alert_exposure_per_event","kind":"output","label":"Alert Exposure Per Event","rule":"(Observed Amount ÷ Observed Count, or 0 when the divisor is 0)","sources":[{"node":"input-observed_amount"},{"node":"input-observed_count"}],"calls":[{"function":"aml_exposure_per_event","label":"AML exposure per event","bindings":[{"name":"amount","label":"Amount","value":"Observed Amount"},{"name":"events","label":"Events","value":"Observed Count"}],"rule":"(Observed Amount ÷ Observed Count, or 0 when the divisor is 0)"}]},{"id":"step-observed_geography_expected","label":"Observed Geography Expected","kind":"step","rule":"(Sum((Expected Geographies = Observed Geography)) > 0)","sources":[{"node":"input-expected_geographies"},{"node":"input-observed_geography"}],"calls":[{"function":"aml_sum_flags","label":"AML sum flags","bindings":[{"name":"flags","label":"Flags","value":"(Expected Geographies = Observed Geography)"}],"rule":"Sum((Expected Geographies = Observed Geography))"}]},{"id":"output-high_exposure_flag","kind":"output","label":"High Exposure Flag","rule":"High Exposure Flag","sources":[{"node":"step-high_exposure_flag"}]},{"id":"step-new_geography_mismatch","label":"New Geography Mismatch","kind":"step","rule":"(1 − Observed Geography Expected)","sources":[{"node":"step-observed_geography_expected"}],"calls":[{"function":"aml_not","label":"AML not","bindings":[{"name":"flag","label":"Flag","value":"Observed Geography Expected"},{"name":"one","label":"One","value":"1"}],"rule":"(1 − Observed Geography Expected)"}]},{"id":"output-observed_geography_expected","kind":"output","label":"Observed Geography Expected","rule":"Observed Geography Expected","sources":[{"node":"step-observed_geography_expected"}]},{"id":"step-ready","label":"Ready","kind":"step","rule":"Higher of Observed Geography Expected and New Geography Mismatch","sources":[{"node":"step-observed_geography_expected"},{"node":"step-new_geography_mismatch"}]},{"id":"output-new_geography_mismatch","kind":"output","label":"New Geography Mismatch","rule":"New Geography Mismatch","sources":[{"node":"step-new_geography_mismatch"}]},{"id":"output-ready","kind":"output","label":"Ready","rule":"Ready","sources":[{"node":"step-ready"}]}],"topics":[{"label":"Activity","results":["output-alert_exposure_per_event","output-high_exposure_flag","output-new_geography_mismatch","output-observed_geography_expected","output-ready"]}]},"usedBy":[{"kind":"recipe","id":"aml","key":"sha256:413e1908c079cf12df15e0a80a1116460b96824eb2da49d079b8b5f7dfc19086"}]}
