Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions +PrognosticsMetrics/plotAlphaLambda.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

% set up default options
options = struct('boxFill',[.4 .5 .6],'coneFill',[.95 .95 .95],'width',1,...
'timeUnits','s','showResults',1,'xR',-3,'yR',10,'xB',-3,'yB',5,...
'printSummary',0,'FontName','Times','textColor',[0 0 0],'lineColor',[0 0 0],...
'style','tufte','MarkerSize',3,'FontSize',10,'UTParams',[],'completeLegend',0,...
'timeUnits','s','showResults',1,'xR',-0.15,'yR',0.5,'xB',-0.15,'yB',0.9,...
'printSummary',1,'FontName','Times','textColor',[0 0 0],'lineColor',[0 0 0],...
'style','tukey','MarkerSize',3,'FontSize',10,'UTParams',[],'completeLegend',0,...
'name','RUL');

if nargin>3
Expand Down Expand Up @@ -184,21 +184,21 @@
case 'tukey'

% make the box
h = patch([k-width/2 k+width/2 k+width/2 k-width/2],[Q(1) Q(1) Q(3) Q(3)],fillColor);
h = patch([k-width/6 k+width/6 k+width/6 k-width/6],[Q(1) Q(1) Q(3) Q(3)],fillColor);
boxhandles = h;
h = line([k-width/2 k+width/2],[Q(2) Q(2)]);
h = line([k-width/6 k+width/6],[Q(2) Q(2)]);
set(h,'Color',options.lineColor);

% mark the mean
h = line(k,mean(Y));
set(h,'LineStyle','.','Marker','o','Color',options.lineColor,'MarkerFaceColor',options.lineColor);
set(h,'LineStyle','-','Marker','o','Color',options.lineColor,'MarkerFaceColor',options.lineColor);
boxhandles(end+1) = h;

% plot confidence line (whiskers)
h = line([k k],[percentile(Y,.05) percentile(Y,.95)]);
set(h,'Color',options.lineColor);
h = line([k k],[percentile(Y,.05) percentile(Y,.95)]);
set(h,'LineStyle','.','Marker','+','Color',options.lineColor);
set(h,'LineStyle','-','Marker','+','Color',options.lineColor);
boxhandles(end+1) = h;
upperMark = [k percentile(Y,.95)];

Expand Down Expand Up @@ -239,4 +239,3 @@




9 changes: 7 additions & 2 deletions Tester.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
prognosisData.RUL.true=prognosisData.EOL.true - prognosisData.time;
% .RUL.values = (N x t) RUL prediction values at each prediction
% time.
prognosisData.RUL.values=prognosisData.EOL.values - prognosisData.time;
prognosisData.RUL.values=ones(N_sam,Time_Max)
for i = 1:N_sam
for j=1:Time_Max
prognosisData.RUL.values(i,j)=prognosisData.EOL.values(i,j) - prognosisData.time(j);
end
end
% .RUL.weights = (N x t) RUL prediction weights at each prediction
% time.
prognosisData.RUL.weights=prognosisData.EOL.weights;
Expand All @@ -53,4 +58,4 @@

M = computePrognosisMetrics(prognosisData,alphaBeta,sigma);
plotAlphaLambda(prognosisData,alphaBeta(1),alphaBeta(2))
%
%