|
@@ -460,23 +460,26 @@ def plotData3():
|
460
|
460
|
nrows=NumFeaturesToPlot, ncols=1, figsize=(15, 10), dpi=80, facecolor="w", edgecolor="k",sharex=True
|
461
|
461
|
)
|
462
|
462
|
for i in range(NumFeaturesToPlot):
|
|
463
|
+ x=[]
|
|
464
|
+ y=[]
|
|
465
|
+ for k in anomalous_data_indices:
|
|
466
|
+ if (k+TIME_STEPS)<x_test.shape[0]:
|
|
467
|
+ x.append(k+TIME_STEPS)
|
|
468
|
+ y.append(x_test[k+TIME_STEPS,0,indexesToPlot[i]]*stdevs[i]+means[i])
|
|
469
|
+ axes[i].plot(x,y ,color='black',marker='.',linewidth=0,label="Fail detection" )
|
|
470
|
+
|
|
471
|
+
|
463
|
472
|
init=0
|
464
|
473
|
end=testRanges[0][1]
|
465
|
474
|
axes[i].plot(range(init,end),x_test[testRanges[0][0]:testRanges[0][1],0,indexesToPlot[i]]*stdevs[i]+means[i],label="No fail")
|
466
|
475
|
init=end
|
467
|
476
|
end+=(testRanges[1][1]-testRanges[1][0])
|
468
|
477
|
for j in range(1,NumberOfFailures+1):
|
469
|
|
- axes[i].plot(range(init,end),x_test[testRanges[j][0]:testRanges[j][1],0,indexesToPlot[i]]*stdevs[i]+means[i],label="Fail type "+str(j), color=colorline[j-1])
|
|
478
|
+ axes[i].plot(range(init,end),x_test[testRanges[j][0]:testRanges[j][1],0,indexesToPlot[i]]*stdevs[i]+means[i],label="Fail type "+str(j), color=colorline[j-1],linewidth=1)
|
470
|
479
|
if j<NumberOfFailures:
|
471
|
480
|
init=end
|
472
|
481
|
end+=(testRanges[j+1][1]-testRanges[j+1][0])
|
473
|
|
- x=[]
|
474
|
|
- y=[]
|
475
|
|
- for k in anomalous_data_indices:
|
476
|
|
- if (k+TIME_STEPS)<x_test.shape[0]:
|
477
|
|
- x.append(k+TIME_STEPS)
|
478
|
|
- y.append(x_test[k+TIME_STEPS,0,indexesToPlot[i]]*stdevs[i]+means[i])
|
479
|
|
- axes[i].plot(x,y ,color='grey',marker='.',linewidth=0,label="Fail detection" )
|
|
482
|
+
|
480
|
483
|
|
481
|
484
|
if i==(NumFeatures-1):
|
482
|
485
|
axes[i].legend(loc='right')
|
|
@@ -621,7 +624,7 @@ def plotData5():
|
621
|
624
|
if (k+TIME_STEPS)<x_test.shape[0]:
|
622
|
625
|
x.append(k+TIME_STEPS)
|
623
|
626
|
y.append(x_test[k+TIME_STEPS,0,indexesToPlot[i]]*stdevs[i]+means[i])
|
624
|
|
- axes[i].plot(x,y ,color='grey',marker='.',linewidth=0,label="Fail detection" )
|
|
627
|
+ axes[i].plot(x,y ,color='black',marker='.',linewidth=0,label="Fail detection" )
|
625
|
628
|
|
626
|
629
|
if i==(NumFeatures-1):
|
627
|
630
|
axes[i].legend(loc='right')
|
|
@@ -668,7 +671,7 @@ def plotData5():
|
668
|
671
|
if (k+TIME_STEPS)<x_test.shape[0]:
|
669
|
672
|
x.append(k+TIME_STEPS)
|
670
|
673
|
y.append(x_test[k+TIME_STEPS,0,indexesToPlot[i]]*stdevs[i]+means[i])
|
671
|
|
- axes[i+1].plot(x,y ,color='grey',marker='.',linewidth=0,label="Fail detection" )
|
|
674
|
+ axes[i+1].plot(x,y ,color='black',marker='.',linewidth=0,label="Fail detection" )
|
672
|
675
|
if i==0:
|
673
|
676
|
axes[i+1].legend(loc='right')
|
674
|
677
|
s=''
|
|
@@ -729,7 +732,7 @@ def plotData4():
|
729
|
732
|
if (k+TIME_STEPS)<x_test.shape[0]:
|
730
|
733
|
x.append(k+TIME_STEPS)
|
731
|
734
|
y.append(x_test[k+TIME_STEPS,0,indexesToPlot[i]])
|
732
|
|
- axes[i].plot(x,y ,color='grey',marker='.',linewidth=0,label="Fail detection" )
|
|
735
|
+ axes[i].plot(x,y ,color='black',marker='.',linewidth=0,label="Fail detection" )
|
733
|
736
|
|
734
|
737
|
if i==0:
|
735
|
738
|
axes[i].legend(bbox_to_anchor=(0.9, 0.4))
|