|
@@ -57,7 +57,7 @@
|
|
|
</div>
|
|
|
<div class="resultContent">
|
|
|
该模型训练和测试的准确率分别为<text style="color: #dc143c">{{result[0]}} 和 {{result[1]}}</text>;
|
|
|
- 误差率分别为<text style="color: #dc143c">{{result[2]}} 和 {{result[3]}}</text>;<br>
|
|
|
+ 误差率分别为<text style="color: #dc143c">{{result2[0]}} 和 {{result2[1]}}</text>;<br>
|
|
|
该模型训练所倚重的测点比重分别为:<text style="color: #dc143c" v-for="(item,index) in proportionList" :key="index">{{item.name+item.percent+(index != (proportionList.length-1)?'、':'')}}</text>。<br>
|
|
|
模型训练过程所有测点倚重占比如下表所示:
|
|
|
</div>
|
|
@@ -90,6 +90,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
result:[],
|
|
|
+ result2:[],
|
|
|
modelName:'',
|
|
|
lossList: {},
|
|
|
accuracyList: {},
|
|
@@ -154,34 +155,46 @@
|
|
|
subUrl: "api/supervised/history",
|
|
|
success(res) {
|
|
|
if (res) {
|
|
|
- let data = []
|
|
|
- res.forEach(ele=>{
|
|
|
- if(ele.name === name){
|
|
|
- ele.coordinate = JSON.parse(ele.coordinate);
|
|
|
- ele.coordinate.bar = JSON.parse(ele.coordinate.bar);
|
|
|
- data = ele;
|
|
|
- }
|
|
|
- })
|
|
|
+ let data = res.find(ele=>{
|
|
|
+ return ele.name === name
|
|
|
+ });
|
|
|
+
|
|
|
+ data.coordinate = JSON.parse(data?.coordinate);
|
|
|
+ data.coordinate.bar = JSON.parse(data?.coordinate.bar);
|
|
|
|
|
|
that.lossList.loss = data?.coordinate.loss;
|
|
|
that.lossList.val_loss = data?.coordinate.val_loss;
|
|
|
+
|
|
|
that.BaseLine = parseFloat(data?.coordinate.BaseLine);
|
|
|
that.accuracyList.accuracy = data?.coordinate.accuracy;
|
|
|
that.accuracyList.val_accuracy = data?.coordinate.val_accuracy;
|
|
|
|
|
|
data?.coordinate.bar?.sort(that.Compare("value"));
|
|
|
that.barList = data?.coordinate.bar?.slice(0, 5);
|
|
|
- // result 顺序:accuracy-val_accuracy-loss-val_loss
|
|
|
- let result = [that.accuracyList.accuracy.sort().pop(),that.accuracyList.val_accuracy.sort().pop(),that.lossList.loss.sort().pop(),that.lossList.val_loss.sort().pop()]
|
|
|
- result.forEach((ele,index)=>{
|
|
|
- result[index] = (ele*100).toFixed(3)+'%'
|
|
|
- })
|
|
|
- that.result = result;
|
|
|
+
|
|
|
+ let accuracy = that.accuracyList.accuracy.sort()[that.accuracyList.accuracy.length-1];
|
|
|
+ let val_accuracy = that.accuracyList.val_accuracy.sort()[that.accuracyList.val_accuracy.length-1];
|
|
|
+ let loss = that.lossList.loss.sort()[that.lossList.loss.length-1];
|
|
|
+ let val_loss = that.lossList.val_loss.sort()[that.lossList.val_loss.length-1];
|
|
|
+ that.endResult(accuracy,val_accuracy,loss,val_loss);
|
|
|
+
|
|
|
that.jzxF(data?.coordinate.bar);
|
|
|
}
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ endResult(accuracy,val_accuracy,loss,val_loss){//取数组最后一位
|
|
|
+ let result = [accuracy,val_accuracy];
|
|
|
+ result.forEach((ele,index)=>{
|
|
|
+ result[index] = (ele*100).toFixed(3)+'%'
|
|
|
+ })
|
|
|
+ let result2 = [loss,val_loss];
|
|
|
+ result2.forEach((ele,index)=>{
|
|
|
+ result2[index] = ele.toFixed(2)
|
|
|
+ })
|
|
|
+ this.result = result;
|
|
|
+ this.result2 = result2;
|
|
|
+ },
|
|
|
Compare(property) {
|
|
|
return function (a, b) {
|
|
|
var value1 = a[property];
|