{% extends 'base.html' %} {% load static %} {% block title %}Cluster #{{ cluster.cluster_label }} — Run #{{ run.display_id }}{% endblock %} {% block content %}
← Cluster Overview

Cluster #{{ cluster.cluster_label }} {% if cluster.cluster_label == -1 %}Noise{% endif %}

{{ cluster.size }} entities {% if cluster.proportion %} — {{ cluster.proportion|floatformat:1 }}% of total{% endif %} {% if cluster.silhouette_score is not None %} — Silhouette: {{ cluster.silhouette_score|floatformat:4 }}{% endif %}

{% if nl_summary %}
{{ nl_summary }}
{% endif %}

📊 Feature Analysis {{ features|length }} features

{% if features %} {% for f in features %} {% endfor %}
# Feature Dist. Score Mean Std Median P25 P75
{{ forloop.counter }} {{ f.feature_name }} {{ f.distinguishing_score|floatformat:3 }} {{ f.mean|floatformat:3|default:"-" }} {{ f.std|floatformat:3|default:"-" }} {{ f.median|floatformat:3|default:"-" }} {{ f.p25|floatformat:3|default:"-" }} {{ f.p75|floatformat:3|default:"-" }}
{% else %}

No feature data for this cluster.

{% endif %}
{% if cluster.cluster_label != -1 %} {# SVD-extracted features (from _run_clustering_pipeline cluster_svd_extract) have higher distinguishing scores #} {% with svd_features=features|slice:":5" %} {% if svd_features %}

🔬 SVD Key Features Top 5 by distinguishing score

{% for f in svd_features %}
{{ f.feature_name }}
Score: {{ f.distinguishing_score|floatformat:2 }} | Mean: {{ f.mean|floatformat:2 }} | Std: {{ f.std|floatformat:2 }}
{% endfor %}
{% endif %} {% endwith %} {% endif %}

👤 Entities {{ entities|length }} shown

{% for e in entities %}
{{ e.entity_value }} Profile
{% if e.feature_json %}
{% for k, v in e.feature_json.items|slice:":8" %} {{ k }}: {% if v is None %}-{% else %}{{ v|floatformat:2 }}{% endif %} {% endfor %} {% if e.feature_json.items|length > 8 %}+{{ e.feature_json.items|length|add:"-8" }} more{% endif %}
{% endif %}
{% empty %}

No entities in this cluster.

{% endfor %}
{% endblock %}