Skip to content

Instantly share code, notes, and snippets.

@jacobmarks
Last active November 9, 2022 23:29
Show Gist options
  • Save jacobmarks/c1466c96760f35bb7eff7b0e6d1917b3 to your computer and use it in GitHub Desktop.
Save jacobmarks/c1466c96760f35bb7eff7b0e6d1917b3 to your computer and use it in GitHub Desktop.
Aggregations on Transformed Field Values
## Option 1
aggregation = fo.Mean(F("predictions.detections.confidence") ** 2)
squared_conf_mean = dataset.aggregate(aggregation)
## Option 2
squared_conf_mean = dataset.mean(F("predictions.detections.confidence") ** 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment