Update assets/js/calibration.js
Browse files- assets/js/calibration.js +4 -6
assets/js/calibration.js
CHANGED
@@ -23,7 +23,6 @@ $(document).ready(function(){
|
|
23 |
var diagram = document.getElementById("reliability-diagram"), cifar100_ece_data;
|
24 |
$.getJSON("images/cifar100/cifar100_ece_value.json", function(data) {cifar100_ece_data = data;});
|
25 |
$('input[type=radio][name=models]').change(function() {diagram.src = updateFigurePath();});
|
26 |
-
$('input[type=radio][name=datasets]').change(function() {diagram.src = updateFigurePath();});
|
27 |
$('input[type=radio][name=calibration_tool]').change(function() {
|
28 |
if(this.value !== 'ts') $("#ts-slider").slider('disable');
|
29 |
else $("#ts-slider").slider('enable');
|
@@ -52,8 +51,7 @@ $(document).ready(function(){
|
|
52 |
});
|
53 |
|
54 |
function updateFigurePath(bin_num=$('#bin-slider').slider("option", "value"),temp=$('#ts-slider').slider("option", "value")) {
|
55 |
-
var
|
56 |
-
cur_model = $("input[type='radio'][name='models']:checked").val(),
|
57 |
cur_tool = $("input[type='radio'][name='calibration_tool']:checked").val(),
|
58 |
actualOnly = document.getElementById("ActualOnly").checked ? "_actual" : "";
|
59 |
var bin_num_text = (bin_num < 10) ? "0" + bin_num.toString() : bin_num.toString();
|
@@ -63,18 +61,18 @@ $(document).ready(function(){
|
|
63 |
var ts_text = "_t" + (temp*100).toString();
|
64 |
if (ts_text === "_t100") {
|
65 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model]["none"][bin_num]).toFixed(5);
|
66 |
-
return "images/" +
|
67 |
}
|
68 |
else
|
69 |
{
|
70 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][temp.toString()][bin_num]).toFixed(5);
|
71 |
-
return "images/"+
|
72 |
}
|
73 |
}
|
74 |
else
|
75 |
{
|
76 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][bin_num]).toFixed(5);
|
77 |
-
return "images/"+
|
78 |
}
|
79 |
}
|
80 |
});
|
|
|
23 |
var diagram = document.getElementById("reliability-diagram"), cifar100_ece_data;
|
24 |
$.getJSON("images/cifar100/cifar100_ece_value.json", function(data) {cifar100_ece_data = data;});
|
25 |
$('input[type=radio][name=models]').change(function() {diagram.src = updateFigurePath();});
|
|
|
26 |
$('input[type=radio][name=calibration_tool]').change(function() {
|
27 |
if(this.value !== 'ts') $("#ts-slider").slider('disable');
|
28 |
else $("#ts-slider").slider('enable');
|
|
|
51 |
});
|
52 |
|
53 |
function updateFigurePath(bin_num=$('#bin-slider').slider("option", "value"),temp=$('#ts-slider').slider("option", "value")) {
|
54 |
+
var cur_model = $("input[type='radio'][name='models']:checked").val(),
|
|
|
55 |
cur_tool = $("input[type='radio'][name='calibration_tool']:checked").val(),
|
56 |
actualOnly = document.getElementById("ActualOnly").checked ? "_actual" : "";
|
57 |
var bin_num_text = (bin_num < 10) ? "0" + bin_num.toString() : bin_num.toString();
|
|
|
61 |
var ts_text = "_t" + (temp*100).toString();
|
62 |
if (ts_text === "_t100") {
|
63 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model]["none"][bin_num]).toFixed(5);
|
64 |
+
return "images/" + "cifar100/" + "/" + cur_model + "/none/" + "bin" + bin_num_text + actualOnly + ".png";
|
65 |
}
|
66 |
else
|
67 |
{
|
68 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][temp.toString()][bin_num]).toFixed(5);
|
69 |
+
return "images/"+"cifar100/"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+ts_text+actualOnly+".png";
|
70 |
}
|
71 |
}
|
72 |
else
|
73 |
{
|
74 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][bin_num]).toFixed(5);
|
75 |
+
return "images/"+"cifar100/"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+actualOnly+".png";
|
76 |
}
|
77 |
}
|
78 |
});
|