zsss0316 commited on
Commit
d667d99
·
verified ·
1 Parent(s): 324e6e2

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +66 -29
index.html CHANGED
@@ -2,7 +2,7 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <title>Infernet Leaderboard</title>
6
  <style>
7
  body {font-family: Arial; max-width:1100px; margin:30px auto; padding:0 20px;}
8
  table {width:100%; border-collapse: collapse; margin:15px 0 40px;}
@@ -26,38 +26,15 @@ Dataset: <a href="https://huggingface.co/datasets/CamoAiLab/Infernet">CamoAiLab/
26
  <button class="tab" onclick="switchTab(2)">3. Correct Coefficient Direction</button>
27
  </div>
28
 
29
- <div class="panel show">
30
- <h3>Ranked by Code Compilation Success</h3>
31
- <table>
32
- <tr><th>Rank</th><th>Model</th><th>Compilation Success (%)</th></tr>
33
- <tr><td>1</td><td>Example Model A</td><td>92.5</td></tr>
34
- <tr><td>2</td><td>Example Model B</td><td>85.0</td></tr>
35
- </table>
36
- </div>
37
-
38
- <div class="panel">
39
- <h3>Ranked by Partial Replication Rate</h3>
40
- <table>
41
- <tr><th>Rank</th><th>Model</th><th>Partial Replication (%)</th></tr>
42
- <tr><td>1</td><td>Example Model A</td><td>88.0</td></tr>
43
- <tr><td>2</td><td>Example Model B</td><td>70.0</td></tr>
44
- </table>
45
- </div>
46
-
47
- <div class="panel">
48
- <h3>Ranked by Correct Coefficient Direction</h3>
49
- <table>
50
- <tr><th>Rank</th><th>Model</th><th>Correct Coefficient Direction (%)</th></tr>
51
- <tr><td>1</td><td>Example Model A</td><td>85.0</td></tr>
52
- <tr><td>2</td><td>Example Model B</td><td>65.0</td></tr>
53
- </table>
54
- </div>
55
 
56
  <h3>📌 Metric Definition</h3>
57
  <ul>
58
  <li><strong>Compilation Success:</strong> Generated code runs without runtime errors.</li>
59
- <li><strong>Partial Replication:</strong> Partial matching of estimation outputs.</li>
60
- <li><strong>Correct Coefficient Direction:</strong> Accuracy of predicting coefficient sign.</li>
61
  </ul>
62
 
63
  <script>
@@ -69,6 +46,66 @@ function switchTab(idx){
69
  panels[idx].classList.add("show");
70
  tabs[idx].classList.add("active");
71
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </script>
73
  </body>
74
  </html>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <title>Infernet Econometrics Benchmark Leaderboard</title>
6
  <style>
7
  body {font-family: Arial; max-width:1100px; margin:30px auto; padding:0 20px;}
8
  table {width:100%; border-collapse: collapse; margin:15px 0 40px;}
 
26
  <button class="tab" onclick="switchTab(2)">3. Correct Coefficient Direction</button>
27
  </div>
28
 
29
+ <div class="panel show" id="panel-compile"></div>
30
+ <div class="panel" id="panel-rep"></div>
31
+ <div class="panel" id="panel-dir"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  <h3>📌 Metric Definition</h3>
34
  <ul>
35
  <li><strong>Compilation Success:</strong> Generated code runs without runtime errors.</li>
36
+ <li><strong>Partial Replication:</strong> Partially reproduce target estimation results.</li>
37
+ <li><strong>Correct Coefficient Direction:</strong> Correct sign of estimated coefficients.</li>
38
  </ul>
39
 
40
  <script>
 
46
  panels[idx].classList.add("show");
47
  tabs[idx].classList.add("active");
48
  }
49
+
50
+ // 简易CSV解析
51
+ function parseCSV(text) {
52
+ const lines = text.trim().split("\n");
53
+ const headers = lines[0].split(",");
54
+ const rows = [];
55
+ for(let i=1;i<lines.length;i++){
56
+ const vals = lines[i].split(",");
57
+ const obj = {};
58
+ headers.forEach((h,idx)=>obj[h.trim()]=vals[idx].trim());
59
+ rows.push(obj);
60
+ }
61
+ return rows;
62
+ }
63
+
64
+ function buildTable(title, data, sortKey){
65
+ // 数值降序排序
66
+ const sorted = [...data].sort((a,b)=> Number(b[sortKey]) - Number(a[sortKey]));
67
+ let html = `<h3>${title}</h3><table><tr><th>Rank</th><th>Model</th><th>${sortKey}</th></tr>`;
68
+ sorted.forEach((row,i)=>{
69
+ html += `<tr>
70
+ <td>${i+1}</td>
71
+ <td>${row["Model ID"]}</td>
72
+ <td>${row[sortKey]}%</td>
73
+ </tr>`;
74
+ })
75
+ html += "</table>";
76
+ return html;
77
+ }
78
+
79
+ // CSV raw 地址(确认路径正确)
80
+ const csvUrl = "https://huggingface.co/datasets/CamoAiLab/Infernet/resolve/main/eval_submissions/results.csv";
81
+
82
+ async function loadData(){
83
+ try {
84
+ const res = await fetch(csvUrl);
85
+ const csvText = await res.text();
86
+ const data = parseCSV(csvText);
87
+
88
+ document.getElementById("panel-compile").innerHTML = buildTable(
89
+ "Ranked by Code Compilation Success",
90
+ data,
91
+ "Compilation Success (%)"
92
+ );
93
+ document.getElementById("panel-rep").innerHTML = buildTable(
94
+ "Ranked by Partial Replication Rate",
95
+ data,
96
+ "Partial Replication (%)"
97
+ );
98
+ document.getElementById("panel-dir").innerHTML = buildTable(
99
+ "Ranked by Correct Coefficient Direction",
100
+ data,
101
+ "Correct Coefficient Direction (%)"
102
+ );
103
+ } catch(err){
104
+ console.error("Load csv error",err);
105
+ document.body.insertAdjacentHTML("beforeend","<p style='color:red'>Failed to load ranking data.</p>");
106
+ }
107
+ }
108
+ loadData();
109
  </script>
110
  </body>
111
  </html>