davanstrien HF Staff Claude Opus 4.5 commited on
Commit
2740f73
·
1 Parent(s): 803ad5c

Fix confidence score display for v2 model

Browse files

v2 model has 75.8% of scores above 0.99, so %.0f formatting made
everything show "100%". Switch to %.1f for meaningful differentiation.
Update confidence filter thresholds from v1 range (0.5-0.72) to v2
range (0.5-0.99).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

app.py CHANGED
@@ -131,11 +131,11 @@ def get_categories() -> list[str]:
131
  def get_confidence_counts() -> dict[str, int]:
132
  """Count papers at each confidence threshold (for Tufte-style filter).
133
 
134
- Thresholds chosen based on actual data distribution (avg ~70% confidence).
135
  """
136
  df = get_dataframe()
137
  new_datasets = df.filter(pl.col("is_new_dataset"))
138
- thresholds = [0.5, 0.6, 0.65, 0.7, 0.71]
139
  return {
140
  str(t): new_datasets.filter(pl.col("confidence_score") >= t).height
141
  for t in thresholds
 
131
  def get_confidence_counts() -> dict[str, int]:
132
  """Count papers at each confidence threshold (for Tufte-style filter).
133
 
134
+ Thresholds chosen based on v2 model distribution (avg ~97% confidence).
135
  """
136
  df = get_dataframe()
137
  new_datasets = df.filter(pl.col("is_new_dataset"))
138
+ thresholds = [0.5, 0.8, 0.9, 0.95, 0.99]
139
  return {
140
  str(t): new_datasets.filter(pl.col("confidence_score") >= t).height
141
  for t in thresholds
templates/index.html CHANGED
@@ -84,8 +84,9 @@
84
  hx-include="#filter-form, #search-input, #category-select, #since-filter, #sort-select, #search-type-toggle"
85
  hx-indicator="#loading-indicator"
86
  hx-push-url="true">
87
- <option value="0.5" {% if min_confidence == '0.5' %}selected{% endif %}>New datasets only</option>
88
- <option value="0.6" {% if min_confidence == '0.6' %}selected{% endif %}>Higher confidence</option>
 
89
  <option value="0" {% if min_confidence == '0' %}selected{% endif %}>All papers</option>
90
  </select>
91
 
 
84
  hx-include="#filter-form, #search-input, #category-select, #since-filter, #sort-select, #search-type-toggle"
85
  hx-indicator="#loading-indicator"
86
  hx-push-url="true">
87
+ <option value="0.5" {% if min_confidence == '0.5' %}selected{% endif %}>All classified (&ge;50%)</option>
88
+ <option value="0.9" {% if min_confidence == '0.9' %}selected{% endif %}>High confidence (&ge;90%)</option>
89
+ <option value="0.99" {% if min_confidence == '0.99' %}selected{% endif %}>Very high (&ge;99%)</option>
90
  <option value="0" {% if min_confidence == '0' %}selected{% endif %}>All papers</option>
91
  </select>
92
 
templates/partials/paper_card.html CHANGED
@@ -36,7 +36,7 @@
36
  </span>
37
  </span>
38
  <span class="text-gray-400 inline-flex items-center gap-1">
39
- {{ "%.0f"|format(paper.confidence_score * 100) }}% conf.
40
  <span class="cursor-help" title="Model confidence this paper introduces a new dataset">
41
  <svg class="w-3.5 h-3.5 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
42
  <circle cx="12" cy="12" r="10" stroke-width="1.5"></circle>
@@ -47,7 +47,7 @@
47
  </span>
48
  {% else %}
49
  <span class="{% if paper.confidence_score < 0.8 %}text-gray-400{% else %}text-gray-500{% endif %} inline-flex items-center gap-1">
50
- {{ "%.0f"|format(paper.confidence_score * 100) }}% conf.
51
  <span class="cursor-help" title="Model confidence this paper introduces a new dataset">
52
  <svg class="w-3.5 h-3.5 {% if paper.confidence_score < 0.8 %}text-gray-300{% else %}text-gray-400{% endif %}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
53
  <circle cx="12" cy="12" r="10" stroke-width="1.5"></circle>
 
36
  </span>
37
  </span>
38
  <span class="text-gray-400 inline-flex items-center gap-1">
39
+ {{ "%.1f"|format(paper.confidence_score * 100) }}% conf.
40
  <span class="cursor-help" title="Model confidence this paper introduces a new dataset">
41
  <svg class="w-3.5 h-3.5 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
42
  <circle cx="12" cy="12" r="10" stroke-width="1.5"></circle>
 
47
  </span>
48
  {% else %}
49
  <span class="{% if paper.confidence_score < 0.8 %}text-gray-400{% else %}text-gray-500{% endif %} inline-flex items-center gap-1">
50
+ {{ "%.1f"|format(paper.confidence_score * 100) }}% conf.
51
  <span class="cursor-help" title="Model confidence this paper introduces a new dataset">
52
  <svg class="w-3.5 h-3.5 {% if paper.confidence_score < 0.8 %}text-gray-300{% else %}text-gray-400{% endif %}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
53
  <circle cx="12" cy="12" r="10" stroke-width="1.5"></circle>