> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/developer/rest-api/model-evaluations/vector-analysis.md).

# Vector Analysis

Returns the image-embedding clustering output for the evaluation - UMAP-projected embeddings clustered by HDBSCAN, with per-cluster aggregate metrics. Useful for spotting groups of images where the model performs systematically better or worse.

This is the data the **vector analysis** panel in the app reads.

```url
https://api.roboflow.com/:workspace/model-evals/:evalId/vector-analysis
```

```bash
curl "https://api.roboflow.com/my-workspace/model-evals/$EVAL_ID/vector-analysis?api_key=$ROBOFLOW_API_KEY"
```

## Query parameters

| Parameter    | Type    | Description                                                                       |
| ------------ | ------- | --------------------------------------------------------------------------------- |
| `confidence` | integer | Confidence-threshold percentage in `[0, 100]` (defaults to the canonical report). |

## Response

```json
{
    "clustering": {
        "method": "hdbscan",
        "nClusters": 54,
        "metrics": {
            "noiseRatio": 0.078125,
            "silhouetteScore": 0.48925095796585083
        },
        "parameters": {
            "min_cluster_size": 2,
            "min_samples": 1,
            "cluster_selection_method": "eom",
            "metric": "euclidean"
        },
        "processingTimeSeconds": 8.36
    },
    "preprocessing": {
        "method": "umap",
        "originalDimensions": 768,
        "targetDimensions": 10,
        "nNeighbors": 30,
        "minDistance": 0.05
    },
    "clusters": [
        {
            "id": -1,
            "numImages": 15,
            "splitDistribution": { "train": 12, "valid": 2, "test": 1 },
            "metrics": {
                "f1Mean": 0.462,
                "f1Std": 0.219,
                "f1Min": 0.129,
                "f1Max": 0.8,
                "precisionMean": 0.330,
                "recallMean": 0.952
            },
            "sampleImages": ["img1.jpg", "img2.jpg"]
        },
        {
            "id": 0,
            "numImages": 3,
            "splitDistribution": { "train": 2, "valid": 1 },
            "metrics": {
                "f1Mean": 0.889,
                "f1Std": 0.157,
                "f1Min": 0.667,
                "f1Max": 1.0,
                "precisionMean": 1.0,
                "recallMean": 0.833
            },
            "sampleImages": ["img3.jpg", "img4.jpg", "img5.jpg"]
        }
    ]
}
```

## Notes

* Cluster id `-1` is the noise/unclustered bucket (HDBSCAN convention) - images that don't fit any dense region.
* `precisionMean` and `recallMean` are averaged over all images in the cluster.
* Per-image embeddings and cluster assignments are surfaced via [Per-Image Predictions](/developer/rest-api/model-evaluations/per-image-predictions.md).
