Configuration of per-day summary of exposures.
During summarization the following are computed for each ExposureWindow
s:
- a weighted duration, computed as
( immediateDurationSeconds * immediateDurationWeight ) + ( nearDurationSeconds * nearDurationWeight ) + ( mediumDurationSeconds * mediumDurationWeight ) + ( otherDurationSeconds * otherDurationWeight )
- a score, computed as
reportTypeWeights[Tek.reportType] * infectiousnessWeights[infectiousness] * weightedDuration
where infectiousness and reportType are set based on the ExposureWindow's diagnosis key and the DiagnosisKeysDataMapping
The ExposureWindow
s
are then filtered, removing those with score lower than
getMinimumWindowScore()
.
Scores and weighted durations of the ExposureWindow
s
that pass the
getMinimumWindowScore()
are then aggregated over a day to compute the maximum and
cumulative scores and duration:
- sumScore = sum(score of ExposureWindows)
- maxScore = max(score of ExposureWindows)
- weightedDurationSum = sum(weighted duration of ExposureWindow)
Note that when the weights are typically around 100% (1.0), both the scores and the weightedDurationSum can be considered as being expressed in seconds. For example, 15 minutes of exposure with all weights equal to 1.0 would be 60 * 15 = 900 (seconds).
Nested Class Summary
class | DailySummariesConfig.DailySummariesConfigBuilder | A builder for
DailySummariesConfig . |
Inherited Constant Summary
Field Summary
public static final Creator<DailySummariesConfig> | CREATOR |
Public Method Summary
boolean | |
List<Integer> |
getAttenuationBucketThresholdDb()
Thresholds defining the BLE attenuation buckets edges.
|
List<Double> |
getAttenuationBucketWeights()
Scoring weights to associate with ScanInstances depending on the attenuation
bucket in which their typicalAttenuationDb falls.
|
int |
getDaysSinceExposureThreshold()
Day summaries older than this are not returned.
|
Map<Integer, Double> |
getInfectiousnessWeights()
Scoring weights to associate with exposures with different
Infectiousness .
|
double |
getMinimumWindowScore()
Minimum score that ExposureWindows must reach in order to be included in the
DailySummary.ExposureSummaryData .
|
Map<Integer, Double> |
getReportTypeWeights()
Scoring weights to associate with exposures with different
ReportType s.
|
int |
hashCode()
|
String |
toString()
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<DailySummariesConfig> CREATOR
Public Methods
public boolean equals (Object obj)
public List<Integer> getAttenuationBucketThresholdDb ()
Thresholds defining the BLE attenuation buckets edges.
This list must have 3 elements: the immediate, near, and medium thresholds. See attenuationBucketWeights for more information.
These elements must be between 0 and 255 and come in increasing order.
public List<Double> getAttenuationBucketWeights ()
Scoring weights to associate with ScanInstances depending on the attenuation bucket in which their typicalAttenuationDb falls.
This list must have 4 elements, corresponding to the weights for the 4 buckets.
- immediate bucket: -infinity < attenuation <= immediate threshold
- near bucket: immediate threshold < attenuation <= near threshold
- medium bucket: near threshold < attenuation <= medium threshold
- other bucket: medium threshold < attenuation < +infinity
public int getDaysSinceExposureThreshold ()
Day summaries older than this are not returned.
To return all available day summaries, set to 0, which is treated differently.
public Map<Integer, Double> getInfectiousnessWeights ()
Scoring weights to associate with exposures with different
Infectiousness
.
This map can include weights for the following
Infectiousness
values:
- STANDARD
- HIGH
public double getMinimumWindowScore ()
Minimum score that ExposureWindows must reach in order to be included in the
DailySummary.ExposureSummaryData
.
Use 0 to consider all
ExposureWindow
s (recommended).
public Map<Integer, Double> getReportTypeWeights ()
Scoring weights to associate with exposures with different
ReportType
s.
This map can include weights for the following
ReportType
s:
- CONFIRMED_TEST
- CONFIRMED_CLINICAL_DIAGNOSIS
- SELF_REPORT
- RECURSIVE (reserved for future use)