analyze command reads a _clustered.csv file produced by cluster and computes the Average Nearest Neighbor (ANN) index for each cluster to characterize how the detected objects are spatially distributed.
Syntax
Options
Path to the clustered CSV file produced by the
cluster command. Short alias: -i.This file must contain a cluster column in addition to the feature columns.Directory where output plots and statistics are written. Short alias:
-o.Defaults to an analysis/ subdirectory next to the input CSV file.ANN index explained
The Average Nearest Neighbor (ANN) index is the ratio of the observed mean nearest-neighbor distance to the expected mean distance under a random distribution:| R-index value | Interpretation |
|---|---|
| R < 0.9 | Clustered — objects are closer together than expected by chance |
| 0.9 ≤ R ≤ 1.1 | Random — no significant spatial pattern |
| R > 1.1 | Dispersed — objects are more spread out than expected by chance |
Output files
Examples
When using the
pipeline command, spatial analysis runs automatically on all images and writes results to the analysis/ subdirectory of the session. Use analyze directly only when you need to rerun this stage on existing clustered data.