Google is committed to advancing racial equity for Black communities. See how.

DailySummariesConfig

public class DailySummariesConfig extends Object
implements Parcelable Parcelable

Configuration of per-day summary of exposures.

During summarization the following are computed for each ExposureWindows:

  • 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 ExposureWindows are then filtered, removing those with score lower than getMinimumWindowScore().

Scores and weighted durations of the ExposureWindows 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()
Reserved for future use, behavior will be changed in future revisions.
Map<IntegerDouble>
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<IntegerDouble>
getReportTypeWeights()
Scoring weights to associate with exposures with different ReportTypes.
int
String
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
Each element must be between 0 and 2.5.

public int getDaysSinceExposureThreshold ()

Reserved for future use, behavior will be changed in future revisions. No value should be set, or else 0 should be used.

public Map<IntegerDouble> getInfectiousnessWeights ()

Scoring weights to associate with exposures with different Infectiousness.

This map can include weights for the following Infectiousness values:

  • STANDARD
  • HIGH
Each element must be between 0 and 2.5.

public double getMinimumWindowScore ()

Minimum score that ExposureWindows must reach in order to be included in the DailySummary.ExposureSummaryData.

Use 0 to consider all ExposureWindows (recommended).

public Map<IntegerDouble> getReportTypeWeights ()

Scoring weights to associate with exposures with different ReportTypes.

This map can include weights for the following ReportTypes:

  • CONFIRMED_TEST
  • CONFIRMED_CLINICAL_DIAGNOSIS
  • SELF_REPORT
  • RECURSIVE (reserved for future use)
Each element must be between 0 and 2.5.

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)