Update assets/js/calibration.js
Browse files- assets/js/calibration.js +5 -8
assets/js/calibration.js
CHANGED
|
@@ -52,8 +52,7 @@ $(document).ready(function(){
|
|
| 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();
|
| 58 |
var ece_board = document.getElementById("ece-value");
|
| 59 |
if (cur_tool === "ts")
|
|
@@ -61,25 +60,23 @@ $(document).ready(function(){
|
|
| 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 +
|
| 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+
|
| 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+
|
| 76 |
}
|
| 77 |
}
|
| 78 |
});
|
| 79 |
|
| 80 |
function figureOption() {
|
| 81 |
-
var checkBox = document.getElementById("ActualOnly");
|
| 82 |
var diagram = document.getElementById("reliability-diagram");
|
| 83 |
-
|
| 84 |
-
else diagram.src = diagram.src.replace("_actual.png", ".png");
|
| 85 |
}
|
|
|
|
| 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 |
var bin_num_text = (bin_num < 10) ? "0" + bin_num.toString() : bin_num.toString();
|
| 57 |
var ece_board = document.getElementById("ece-value");
|
| 58 |
if (cur_tool === "ts")
|
|
|
|
| 60 |
var ts_text = "_t" + (temp*100).toString();
|
| 61 |
if (ts_text === "_t100") {
|
| 62 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model]["none"][bin_num]).toFixed(5);
|
| 63 |
+
return "images/" + "cifar100" + "/" + cur_model + "/none/" + "bin" + bin_num_text + "_actual" + ".png";
|
| 64 |
}
|
| 65 |
else
|
| 66 |
{
|
| 67 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][temp.toString()][bin_num]).toFixed(5);
|
| 68 |
+
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+ts_text+"_actual"+".png";
|
| 69 |
}
|
| 70 |
}
|
| 71 |
else
|
| 72 |
{
|
| 73 |
ece_board.innerText = parseFloat(cifar100_ece_data[cur_model][cur_tool][bin_num]).toFixed(5);
|
| 74 |
+
return "images/"+"cifar100"+"/"+cur_model+"/"+cur_tool+"/"+"bin"+bin_num_text+"_actual"+".png";
|
| 75 |
}
|
| 76 |
}
|
| 77 |
});
|
| 78 |
|
| 79 |
function figureOption() {
|
|
|
|
| 80 |
var diagram = document.getElementById("reliability-diagram");
|
| 81 |
+
diagram.src = diagram.src.replace(".png", "_actual.png");
|
|
|
|
| 82 |
}
|