steps = 20; % steps = 5; dims = 5; d_steps = 100000; % precision in defining the distributions of the conditional probability of failure (in partitions) % char ind_space; inds = Lin_Mat(dims); for i=1:length(inds), inds(i) = 1; end % alpha = [10 50 20 50 20]; alpha = [10 10 40 30 10]; % Bootstrap Dirichlet distribution % Date: 17/06/2023 % Now calculate the marginal distribution of the total probability of failure as a sum of convolutions. % need to define the distributions of the conditional probability of % failure in sub-domains. % % Bootstraping distribution (prior for all AVs) cond_distr_params = struct('partition',[],'alfa',[],'beta',[],'steps',[],'pdf',[]); cond_distr_params(1).partition = 1; cond_distr_params(1).alfa = 2; cond_distr_params(1).beta = 299; % cond_distr_params(1).steps = 10000; cond_distr_params(1).steps = d_steps; cond_distr_params(2).partition = 2; cond_distr_params(2).alfa = 2; cond_distr_params(2).beta = 800; % cond_distr_params(2).steps = 10000; cond_distr_params(2).steps = d_steps; cond_distr_params(3).partition = 3; cond_distr_params(3).alfa = 2; cond_distr_params(3).beta = 1500; % cond_distr_params(3).steps = 10000; cond_distr_params(3).steps = d_steps; cond_distr_params(4).partition = 4; cond_distr_params(4).alfa = 2; cond_distr_params(4).beta = 1000; % cond_distr_params(4).steps = 10000; cond_distr_params(4).steps = d_steps; cond_distr_params(5).partition = 5; cond_distr_params(5).alfa = 1; cond_distr_params(5).beta = 400; % cond_distr_params(5).steps = 10000; cond_distr_params(5).steps = d_steps; for i=1:dims, % get the distrbutions of the conditional probabilities of failure cond_distr_params(i).pdf = gen_beta_m(cond_distr_params(i).alfa,cond_distr_params(i).beta,cond_distr_params(i).steps); end % Observations for all AVs AV_count = 5; observ_AV1 = struct('partition',[],'miles',[],'failures',[]); % observation AV1 observ_AV1(1).partition = 1; observ_AV1(1).miles = 7; observ_AV1(1).failures = 0; observ_AV1(2).partition = 2; observ_AV1(2).miles = 9; observ_AV1(2).failures = 0; observ_AV1(3).partition = 3; observ_AV1(3).miles = 45; observ_AV1(3).failures = 0; observ_AV1(4).partition = 4; observ_AV1(4).miles = 30; observ_AV1(4).failures = 0; observ_AV1(5).partition = 5; observ_AV1(5).miles = 9; observ_AV1(5).failures = 0; total_miles(1) = 0; total_failures(1) = 0; for i=1:AV_count, total_miles(1) = total_miles(1) + observ_AV1(i).miles; % Count of miles used in black-box inference total_failures(1) = total_failures(1) + observ_AV1(i).failures; % Count of failures used in black-box inference end % observation AV2 observ_AV2 = struct('partition',[],'miles',[],'failures',[]); observ_AV2(1).partition = 1; observ_AV2(1).miles = 10; observ_AV2(1).failures = 0; observ_AV2(2).partition = 2; observ_AV2(2).miles = 45; observ_AV2(2).failures = 0; observ_AV2(3).partition = 3; observ_AV2(3).miles = 30; observ_AV2(3).failures = 0; observ_AV2(4).partition = 4; observ_AV2(4).miles = 8; observ_AV2(4).failures = 0; observ_AV2(5).partition = 5; observ_AV2(5).miles = 7; observ_AV2(5).failures = 0; total_miles(2)= 0; total_failures(2) = 0; for i=1:AV_count, total_miles(2) = total_miles(2) + observ_AV2(i).miles; % Count of miles used in black-box inference total_failures(2) = total_failures(2) + observ_AV2(i).failures; % Count of failures used in black-box inference end % observation AV3 observ_AV3 = struct('partition',[],'miles',[],'failures',[]); observ_AV3(1).partition = 1; observ_AV3(1).miles = 45; observ_AV3(1).failures = 0; observ_AV3(2).partition = 2; observ_AV3(2).miles = 30; observ_AV3(2).failures = 0; observ_AV3(3).partition = 3; observ_AV3(3).miles = 7; observ_AV3(3).failures = 0; observ_AV3(4).partition = 4; observ_AV3(4).miles = 9; observ_AV3(4).failures = 0; observ_AV3(5).partition = 5; observ_AV3(5).miles = 9; observ_AV3(5).failures = 0; total_miles(3) = 0; total_failures(3) = 0; for i=1:AV_count, total_miles(3) = total_miles(3) + observ_AV3(i).miles; % Count of miles used in black-box inference total_failures(3) = total_failures(3) + observ_AV3(i).failures; % Count of failures used in black-box inference end % observation AV3_fail observ_AV3_fail = struct('partition',[],'miles',[],'failures',[]); observ_AV3_fail(1).partition = 1; observ_AV3_fail(1).miles = 45; observ_AV3_fail(1).failures = 1; observ_AV3_fail(2).partition = 2; observ_AV3_fail(2).miles = 30; observ_AV3_fail(2).failures = 1; observ_AV3_fail(3).partition = 3; observ_AV3_fail(3).miles = 7; observ_AV3_fail(3).failures = 0; observ_AV3_fail(4).partition = 4; observ_AV3_fail(4).miles = 9; observ_AV3_fail(4).failures = 0; observ_AV3_fail(5).partition = 5; observ_AV3_fail(5).miles = 9; observ_AV3_fail(5).failures = 0; total_miles(6) = 0; total_failures(6) = 0; for i=1:AV_count, total_miles(6) = total_miles(6) + observ_AV3_fail(i).miles; % Count of miles used in black-box inference total_failures(6) = total_failures(6) + observ_AV3_fail(i).failures; % Count of failures used in black-box inference end % observation AV4 observ_AV4 = struct('partition',[],'miles',[],'failures',[]); observ_AV4(1).partition = 1; observ_AV4(1).miles = 20; observ_AV4(1).failures = 0; observ_AV4(2).partition = 2; observ_AV4(2).miles = 20; observ_AV4(2).failures = 0; observ_AV4(3).partition = 3; observ_AV4(3).miles = 20; observ_AV4(3).failures = 0; observ_AV4(4).partition = 4; observ_AV4(4).miles = 20; observ_AV4(4).failures = 0; observ_AV4(5).partition = 5; observ_AV4(5).miles =20; observ_AV4(5).failures = 0; total_miles(4) = 0; total_failures(4) = 0; for i=1:AV_count, total_miles(4) = total_miles(4) + observ_AV4(i).miles; % Count of miles used in black-box inference total_failures(4) = total_failures(4) + observ_AV4(i).failures; % Count of failures used in black-box inference end % observation AV5 observ_AV5 = struct('partition',[],'miles',[],'failures',[]); observ_AV5(1).partition = 1; observ_AV5(1).miles = 45; observ_AV5(1).failures = 0; observ_AV5(2).partition = 2; observ_AV5(2).miles = 19; observ_AV5(2).failures = 0; observ_AV5(3).partition = 3; observ_AV5(3).miles = 7; observ_AV5(3).failures = 0; observ_AV5(4).partition = 4; observ_AV5(4).miles = 9; observ_AV5(4).failures = 0; observ_AV5(5).partition = 5; observ_AV5(5).miles = 20; observ_AV5(5).failures = 0; total_miles(5) = 0; total_failures(5) = 0; % compute the counts needed for black-box inference for i=1:AV_count, total_miles(5) = total_miles(5) + observ_AV5(i).miles; % Count of miles used in black-box inference total_failures(5) = total_failures(5) + observ_AV5(i).failures; % Count of failures used in black-box inference end % observation All AVs observ_all = struct('partition',[],'miles',[],'failures',[]); observ_all(1).partition = 1; observ_all(1).miles = 0; observ_all(1).failures = 0; observ_all(2).partition = 2; observ_all(2).miles = 0; observ_all(2).failures = 0; observ_all(3).partition = 3; observ_all(3).miles = 0; observ_all(3).failures = 0; observ_all(4).partition = 4; observ_all(4).miles = 0; observ_all(4).failures = 0; observ_all(5).partition = 5; observ_all(5).miles = 0; observ_all(5).failures = 0; vendor_total_miles = 0; % Count of miles used for vendor black-box inference vendor_total_failures = 0; % Count of failures used for vendor black-box inference % Compute the aggregated counts (miles and failures for all AVs) for i=1:AV_count, observ_all(i).miles = observ_all(i).miles + observ_AV1(i).miles; observ_all(i).miles = observ_all(i).miles + observ_AV2(i).miles; observ_all(i).miles = observ_all(i).miles + observ_AV3(i).miles; observ_all(i).miles = observ_all(i).miles + observ_AV4(i).miles; observ_all(i).miles = observ_all(i).miles + observ_AV5(i).miles; vendor_total_miles = vendor_total_miles + observ_all(i).miles; observ_all(i).failures = observ_all(i).failures + observ_AV1(i).failures; observ_all(i).failures = observ_all(i).failures + observ_AV2(i).failures; observ_all(i).failures = observ_all(i).failures + observ_AV3(i).failures; observ_all(i).failures = observ_all(i).failures + observ_AV4(i).failures; observ_all(i).failures = observ_all(i).failures + observ_AV5(i).failures; vendor_total_failures = vendor_total_failures + observ_all(i).failures; end % observation All AVs with failures observ_all_fail = struct('partition',[],'miles',[],'failures',[]); observ_all_fail(1).partition = 1; observ_all_fail(1).miles = 0; observ_all_fail(1).failures = 0; observ_all_fail(2).partition = 2; observ_all_fail(2).miles = 0; observ_all_fail(2).failures = 0; observ_all_fail(3).partition = 3; observ_all_fail(3).miles = 0; observ_all_fail(3).failures = 0; observ_all_fail(4).partition = 4; observ_all_fail(4).miles = 0; observ_all_fail(4).failures = 0; observ_all_fail(5).partition = 5; observ_all_fail(5).miles = 0; observ_all_fail(5).failures = 0; vendor_total_miles_fail = 0; % Count of miles used for vendor black-box inference vendor_total_failures_fail = 0; % Count of failures used for vendor black-box inference % Compute the aggregatesd counts (miles and failures for all AVs WITH FAILURES) for i=1:AV_count, observ_all_fail(i).miles = observ_all(i).miles + observ_AV1(i).miles; observ_all_fail(i).miles = observ_all(i).miles + observ_AV2(i).miles; observ_all_fail(i).miles = observ_all(i).miles + observ_AV3_fail(i).miles; observ_all_fail(i).miles = observ_all(i).miles + observ_AV4(i).miles; observ_all_fail(i).miles = observ_all(i).miles + observ_AV5(i).miles; vendor_total_miles_fail = vendor_total_miles_fail + observ_all(i).miles; observ_all_fail(i).failures = observ_all(i).failures + observ_AV1(i).failures; observ_all_fail(i).failures = observ_all(i).failures + observ_AV2(i).failures; observ_all_fail(i).failures = observ_all(i).failures + observ_AV3_fail(i).failures; observ_all_fail(i).failures = observ_all(i).failures + observ_AV4(i).failures; observ_all_fail(i).failures = observ_all(i).failures + observ_AV5(i).failures; vendor_total_failures_fail = vendor_total_failures_fail + observ_all(i).failures; end % Define a set of profiles profile = struct('P_part_1',[],'P_part_2',[],'P_part_3',[],'P_part_4',[],'P_part_5',[],'name',[]); profile(1).P_part_1 = 0.1; profile(1).P_part_2 = 0.2; profile(1).P_part_3 = 0.4; profile(1).P_part_4 = 0.25; profile(1).P_part_5 = 0.05; profile(1).name = 'Operational profile 1'; profile(2).P_part_1 = 0.4; profile(2).P_part_2 = 0.2; profile(2).P_part_3 = 0.1; profile(2).P_part_4 = 0.25; profile(2).P_part_5 = 0.05; profile(2).name = 'Operational profile 2'; profile(3).P_part_1 = 0.2; profile(3).P_part_2 = 0.2; profile(3).P_part_3 = 0.2; profile(3).P_part_4 = 0.2; profile(3).P_part_5 = 0.2; profile(3).name = 'Operational profile 3'; % Define a set of structures for the results of all computations plot_array_descr = struct('Plot',[]); % figure_n,title_text,X,Y,LD plot_descr = struct('X',[],'XLabel',[],'Y',[],'YLabel',[],'LD',[]); plot_array_descr = struct('Plot',[]); plot_descr.X = double([1:cond_distr_params(1).steps]/cond_distr_params(1).steps); plot_descr.XLabel = 'pfm'; plot_descr.Y = cond_distr_params(1).pdf plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OCl prior PFM'; % plot_array_descr(1).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(2).steps]/cond_distr_params(2).steps); plot_descr.XLabel = 'pfm'; plot_descr.Y = cond_distr_params(2).pdf; plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC2 prior PFM'; plot_array_descr(2).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(3).steps]/cond_distr_params(3).steps); plot_descr.XLabel = 'pfm'; plot_descr.Y = cond_distr_params(3).pdf; plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC3 prior PFM'; plot_array_descr(3).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(4).steps]/cond_distr_params(4).steps); plot_descr.XLabel = 'pfm'; plot_descr.Y = cond_distr_params(4).pdf; plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC4 prior PFM'; plot_array_descr(4).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'pfm'; plot_descr.Y = cond_distr_params(5).pdf; plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC5 prior PFM'; plot_array_descr(5).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Marginal PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Operational profile 1'; plot_array_descr(6).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Marginal PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Operational profile 2'; plot_array_descr(7).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Marginal PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Operational profile 3'; plot_array_descr(8).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC1: posterior PFM, Observation 1'; plot_array_descr(9).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC2: posterior PFM, Observation 1'; plot_array_descr(10).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC3: posterior PFM, Observation 1'; plot_array_descr(11).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC4: posterior PFM, Observation 1'; plot_array_descr(12).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC5: posterior PFM, Observation 1'; plot_array_descr(13).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC1: posterior PFM, Observation 2'; plot_array_descr(14).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC2: posterior PFM, Observation 2'; plot_array_descr(15).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC3: posterior PFM, Observation 2'; plot_array_descr(16).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC4: posterior PFM, Observation 2'; plot_array_descr(17).Plot = plot_descr; % plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'conditional PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'OC5: posterior PFM, Observation 2'; plot_array_descr(18).Plot = plot_descr; % Bootstrap place holder plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Marginal prior PFM (bootstrap)'; plot_array_descr(19).Plot = plot_descr; % AV 1 placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: Marginal prior PFM'; plot_array_descr(20).Plot = plot_descr; % AV1 black-box posterior distribution placeholder plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: BB marginal posterior PFM (own data)'; plot_array_descr(21).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: BB marginal posterior PFM (fleet data)'; plot_array_descr(22).Plot = plot_descr; % AV1 white-box inference plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: WB marginal posterior PFM (own data)'; plot_array_descr(23).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: WB marginal posterior PFM(fleet data)'; plot_array_descr(24).Plot = plot_descr; % % AV 2 placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: Marginal prior PFM'; plot_array_descr(25).Plot = plot_descr; % AV2 black-box posterior distribution placeh plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: BB marginal posterior PFM(own data)'; plot_array_descr(26).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: BB marginal posterior PFM (fleet data)'; plot_array_descr(27).Plot = plot_descr; % AV2 white-box inference plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: WB marginal posterior PFM (own data)'; plot_array_descr(28).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Marginal system PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: WB marginal posterior PFM (fleet data)'; plot_array_descr(29).Plot = plot_descr; % AV 3 placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: Marginal prior PFM'; plot_array_descr(30).Plot = plot_descr; % AV3 black-box posterior distribution placeh plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: BB marginal posterior PFM (own data)'; plot_array_descr(31).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: BB marginal posterior PFM (fleet data)'; plot_array_descr(32).Plot = plot_descr; % AV3 white-box inference plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: WB marginal posterior PFM (own data)'; plot_array_descr(33).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: WB marginal posterior PFM (all fleet)'; plot_array_descr(34).Plot = plot_descr; % AV 4 placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: Marginal prior PFM'; plot_array_descr(35).Plot = plot_descr; % AV4 black-box posterior distribution placeh plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: BB marginal posterior PFM (own data)'; plot_array_descr(36).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: BB marginal posterior PFM (fleet data)'; plot_array_descr(37).Plot = plot_descr; % AV4 white-box inference plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: WB marginal posterior PFM (own data)'; plot_array_descr(38).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: WB marginal posterior PFM (fleet data)'; plot_array_descr(39).Plot = plot_descr; % AV 5 placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: Marginal prior PFM'; plot_array_descr(40).Plot = plot_descr; % AV5 black-box posterior distribution placeh plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: BB marginal posterior PFM (own data)'; plot_array_descr(41).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: BB marginal posterior PFM (fleet data)'; plot_array_descr(42).Plot = plot_descr; % AV5 white-box inference plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: WB marginal posterior PFM (own data)'; plot_array_descr(43).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: WB marginal posterior PFM (fleet data)'; plot_array_descr(44).Plot = plot_descr; % Vendor placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: Marginal prior PFM'; plot_array_descr(45).Plot = plot_descr; % Black-box placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: BB marginal posterior PFM (fleet data)'; plot_array_descr(46).Plot = plot_descr; % White-box placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: WB marginal posterior PFM (fleet data)'; plot_array_descr(47).Plot = plot_descr; % Observations with failures % AV1 % Black - box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: BB marginal posterior PFM (fleet data with failures)'; plot_array_descr(48).Plot = plot_descr; % White-box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: WB marginal posterior PFM (fleet data with failures)'; plot_array_descr(49).Plot = plot_descr; % AV2 % Black - box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: BB marginal posterior PFM (fleet data with failures)'; plot_array_descr(50).Plot = plot_descr; % White-box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: WB marginal posterior PFM (fleet data with failures)'; plot_array_descr(51).Plot = plot_descr; % AV3 % Black-box placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: BB marginal posterior PFM (own data with failures)'; plot_array_descr(52).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: BB marginal Posterior PFM (fleet data with failures)'; plot_array_descr(53).Plot = plot_descr; % White-box placeholders plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: WB marginal posterior PFM (own data with failures)'; plot_array_descr(54).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: WB marginal posterior PFM (fleet data with failures)'; plot_array_descr(55).Plot = plot_descr; % AV4 % Black - box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: BB marginal posterior PFM (fleet data with failures)'; plot_array_descr(56).Plot = plot_descr; % White-box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'WB marginal posterior PFM (AV4: fleet data with failures)'; plot_array_descr(57).Plot = plot_descr; % AV5 % Black - box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: BB marginal posterior PFM (fleet data with failures)'; plot_array_descr(58).Plot = plot_descr; % White-box placeholder (fleet data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: WB marginal posterior PFM (fleet data with failures)'; plot_array_descr(59).Plot = plot_descr; % Vendor with failures % Black - box placeholder (with failures) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: BB marginal posterior PFM (fleet data with failures)'; plot_array_descr(60).Plot = plot_descr; % White-box placeholder (with failures) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'System PFM'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: WB marginal posterior PFM (fleet data with failures)'; plot_array_descr(61).Plot = plot_descr; % Posterior conditional distributions % No failures observed % AV1 plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: posterior PFM (OC1: own data)'; plot_array_descr(62).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: posterior PFM (OC2: own data)'; plot_array_descr(63).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: posterior PFM (OC3: own data)'; plot_array_descr(64).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: posterior PFM (OC4: own data)'; plot_array_descr(65).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV1: posterior PFM (OC5: own data)'; plot_array_descr(66).Plot = plot_descr; % AV2 plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: posterior PFM (OC1: own data)'; plot_array_descr(67).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: posterior PFM (OC2: own data)'; plot_array_descr(68).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: posterior PFM (OC3: own data)'; plot_array_descr(69).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: posterior PFM (OC4: own data)'; plot_array_descr(70).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV2: posterior PFM (OC5: own data)'; plot_array_descr(71).Plot = plot_descr; % AV3 plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC1: own data)'; plot_array_descr(72).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC2: own data)'; plot_array_descr(73).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC3: own data)'; plot_array_descr(74).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC4: own data)'; plot_array_descr(75).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC5: own data)'; plot_array_descr(76).Plot = plot_descr; % AV4 plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: posterior PFM (OC1: own data)'; plot_array_descr(77).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: posterior PFM (OC2: own data)'; plot_array_descr(78).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: posterior PFM (OC3: own data)'; plot_array_descr(79).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: posterior PFM (OC4: own data)'; plot_array_descr(80).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV4: posterior PFM (OC5: own data)'; plot_array_descr(81).Plot = plot_descr; % AV5 plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: posterior PFM (OC1: own data)'; plot_array_descr(82).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: posterior PFM (OC2: own data)'; plot_array_descr(83).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: posterior PFM (OC3: own data)'; plot_array_descr(84).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: posterior PFM (OC4: own data)'; plot_array_descr(85).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV5: posterior PFM (OC5: own data)'; plot_array_descr(86).Plot = plot_descr; % Vendor plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC1: fleet data)'; plot_array_descr(87).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC2: fleet data)'; plot_array_descr(88).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC3: fleet data)'; plot_array_descr(89).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC4: fleet data)'; plot_array_descr(90).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC5: fleet data)'; plot_array_descr(91).Plot = plot_descr; % Failures observed (by AV3) % AV3 (own data) plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC1: own data with failures)'; plot_array_descr(92).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC2: own data with failures)'; plot_array_descr(93).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC3: own data with failures)'; plot_array_descr(94).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC4: own data with failures)'; plot_array_descr(95).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'AV3: posterior PFM (OC5: own data with failures)'; plot_array_descr(96).Plot = plot_descr; % Vendor plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC1)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC1: fleet data with failures)'; plot_array_descr(97).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC2)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC2: fleet data with failures)'; plot_array_descr(98).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC3)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC3: fleet data with failures)'; plot_array_descr(99).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC4)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC4: fleet data with failures)'; plot_array_descr(100).Plot = plot_descr; plot_descr.X = double([1:cond_distr_params(5).steps]/cond_distr_params(5).steps); plot_descr.XLabel = 'Conditional PFM (OC5)'; plot_descr.Y = Lin_Mat(cond_distr_params(5).steps); plot_descr.YLabel = 'probability density function'; plot_descr.LD = 'Vendor: posterior PFM (OC5: fleet data with failures)'; plot_array_descr(101).Plot = plot_descr; marginal_distr = Lin_Mat(cond_distr_params(1).steps); for i=1:3, mg = marginal_distr; for j = 1:5 switch j case 1 prob = profile(i).P_part_1; case 2 prob = profile(i).P_part_2; case 3 prob = profile(i).P_part_3; case 4 prob = profile(i).P_part_4; otherwise prob = profile(i).P_part_5; end cond_distr = gen_beta_scaled(cond_distr_params(j).alfa,cond_distr_params(j).beta,prob,cond_distr_params(j).steps); if(j==1) marg_conv = cond_distr; else marg_conv = conv(marg_conv,cond_distr); marg_conv(length(marg_conv)+1) = double(0); end end % now apply the waigth to this convolution mg = marginal_distr + marg_conv; plot_array_descr(i+5).Plot.Y = mg; end % Now plot all graphs in a single plot figure_n,title_text,X,Y,LD P1(1) = plot_array_descr(2); P1(2) = plot_array_descr(3); P1(3) = plot_array_descr(5); P2(1) = plot_array_descr(1); P2(2) = plot_array_descr(4); Data = struct('Plot',[],'xlabel',[],'ylabel',[],'xlim',[],'title',[]); Data(1).Plot = P1; Data(1).xlabel = P1(1).Plot.XLabel; Data(1).ylabel = P1(1).Plot.YLabel; Data(1).xlim = 0.03; Data(1).title = 'Conditional Probability of failure (in OCs)'; Data(2).Plot = P2; Data(2).xlabel = P2(1).Plot.XLabel; Data(2).ylabel = P2(1).Plot.YLabel; Data(2).xlim = 0.03; Data(2).title = 'Conditional Probability of failure (in OCs)'; [fig_num,subplot_num] = plotting_subplots(1,Data,1,2,2); clear Data; % Now plot the profiles [fig_num,subplot_num] = plot_bar_subplots(1,profile,3,2,2); % Now plot the marginal distribution of PFM for all profiles. P3(1) = plot_array_descr(6); P3(2) = plot_array_descr(7); P3(3) = plot_array_descr(8); Data(1).Plot = P3; Data(1).xlabel = P3(1).Plot.XLabel; Data(1).ylabel = P3(1).Plot.YLabel; Data(1).xlim = 0.03; Data(1).title = 'Marginal Probability of failure'; [fig_num,subplot_num] = plotting_subplots(1,Data,4,2,2); inds(dims) = 0; count = 0; ind_space = struct('indeces',[],'pdf',[],'volume',[],'x',[]); while (steps > 0) % infinite loop [inds, done] = get_next_index(inds, steps); if(done > 0) if(sum(inds) == steps) count = count + 1; display(count); ind_space(count).indeces = inds; end end if(done > 1) break; end end display(count); display(ind_space); % Now convert the string into a cell of strings x = Lin_Mat(dims); integral = double(0); vol_unit = power(double(1)/double(steps),dims-1); for i=1:count, inds = ind_space(i).indeces; x = double(inds) / double(steps); display(x); ind_space(i).x = x; D = dirichlet_robust(x,alpha); ind_space(i).pdf = D; display(D); ind_space(i).volume = D * vol_unit; integral = integral + D * vol_unit; end display(integral); integral2 = double(0); for i=1:count, ind_space(i).volume = ind_space(i).volume / integral; % compensate rounding errors and set the integral to 1. integral2 = integral2 + ind_space(i).volume; end marginal_distr = Lin_Mat(cond_distr_params(1).steps); for i=1:count, for j=1:dims, cond_distr = gen_beta_scaled(cond_distr_params(j).alfa,cond_distr_params(j).beta,ind_space(i).x(j),cond_distr_params(j).steps); if(j==1) marg_conv = cond_distr; else marg_conv = conv(marg_conv,cond_distr); marg_conv(length(marg_conv)+1) = double(0); end end % now apply the waigth to this convolution marg_conv = marg_conv * ind_space(i).volume; % add add it to the marginal distribution marginal_distr = marginal_distr + marg_conv; end display(sum(marginal_distr)); % figure(100); observ = struct('partition',[],'tests',[],'failures',[]); % observation 1 - obsolete. Observations defined earlier in the code. % observ(1).partition = 1; % observ(1).tests = 8; % observ(1).failures = 0; % observ(2).partition = 2; % observ(2).tests = 22; % observ(2).failures = 0; % observ(3).partition = 3; % observ(3).tests = 39; % observ(3).failures = 0; % observ(4).partition = 4; % observ(4).tests = 23; % observ(4).failures = 0; % observ(5).partition = 5; % observ(5).tests = 8; % observ(5).failures = 0; % AV1 - Update Beta parameters cond_distr_params(6).partition = 1; cond_distr_params(6).alfa = cond_distr_params(1).alfa + observ_AV1(1).failures; cond_distr_params(6).beta = cond_distr_params(1).beta + observ_AV1(1).miles - observ_AV1(1).failures; cond_distr_params(6).steps = cond_distr_params(1).steps; cond_distr_params(7).partition = 2; cond_distr_params(7).alfa = cond_distr_params(2).alfa + observ_AV1(2).failures; cond_distr_params(7).beta = cond_distr_params(2).beta + observ_AV1(2).miles - observ_AV2(2).failures; cond_distr_params(7).steps = cond_distr_params(2).steps; cond_distr_params(8).partition = 3; cond_distr_params(8).alfa = cond_distr_params(3).alfa + observ_AV1(3).failures; cond_distr_params(8).beta = cond_distr_params(3).beta + observ_AV1(3).miles - observ_AV1(3).failures; cond_distr_params(8).steps = cond_distr_params(3).steps; cond_distr_params(9).partition = 4; cond_distr_params(9).alfa = cond_distr_params(4).alfa + observ_AV1(4).failures; cond_distr_params(9).beta = cond_distr_params(4).beta + observ_AV1(4).miles - observ_AV1(4).failures; cond_distr_params(9).steps = cond_distr_params(4).steps; cond_distr_params(10).partition = 5; cond_distr_params(10).alfa = cond_distr_params(5).alfa + observ_AV1(5).failures; cond_distr_params(10).beta = cond_distr_params(5).beta + observ_AV1(5).miles - observ_AV1(5).failures; cond_distr_params(10).steps = cond_distr_params(5).steps; alpha_obs_AV1 = alpha; for i=1:length(alpha), alpha_obs_AV1(i) = alpha_obs_AV1(i) + observ_AV1(i).miles; end alpha_obs_AV1_fail = alpha_obs_AV1; % AV2 - Update Beta parameters cond_distr_params(11).partition = 1; cond_distr_params(11).alfa = cond_distr_params(1).alfa + observ_AV2(1).failures; cond_distr_params(11).beta = cond_distr_params(1).beta + observ_AV2(1).miles - observ_AV2(1).failures; cond_distr_params(11).steps = cond_distr_params(1).steps; cond_distr_params(12).partition = 2; cond_distr_params(12).alfa = cond_distr_params(2).alfa + observ_AV2(2).failures; cond_distr_params(12).beta = cond_distr_params(2).beta + observ_AV2(2).miles - observ_AV2(2).failures; cond_distr_params(12).steps = cond_distr_params(2).steps; cond_distr_params(13).partition = 3; cond_distr_params(13).alfa = cond_distr_params(3).alfa + observ_AV2(3).failures; cond_distr_params(13).beta = cond_distr_params(3).beta + observ_AV2(3).miles - observ_AV2(3).failures; cond_distr_params(13).steps = cond_distr_params(3).steps; cond_distr_params(14).partition = 4; cond_distr_params(14).alfa = cond_distr_params(4).alfa + observ_AV2(4).failures; cond_distr_params(14).beta = cond_distr_params(4).beta + observ_AV2(4).miles - observ_AV2(4).failures; cond_distr_params(14).steps = cond_distr_params(4).steps; cond_distr_params(15).partition = 5; cond_distr_params(15).alfa = cond_distr_params(5).alfa + observ_AV2(5).failures; cond_distr_params(15).beta = cond_distr_params(5).beta + observ_AV2(5).miles - observ_AV2(5).failures; cond_distr_params(15).steps = cond_distr_params(5).steps; alpha_obs_AV2 = alpha; for i=1:length(alpha), alpha_obs_AV2(i) = alpha_obs_AV2(i) + observ_AV2(i).miles; end alpha_obs_AV2_fail = alpha_obs_AV2; % AV3 - Update Beta parameters cond_distr_params(16).partition = 1; cond_distr_params(16).alfa = cond_distr_params(1).alfa + observ_AV3(1).failures; cond_distr_params(16).beta = cond_distr_params(1).beta + observ_AV3(1).miles - observ_AV3(1).failures; cond_distr_params(16).steps = cond_distr_params(1).steps; cond_distr_params(17).partition = 2; cond_distr_params(17).alfa = cond_distr_params(2).alfa + observ_AV3(2).failures; cond_distr_params(17).beta = cond_distr_params(2).beta + observ_AV3(2).miles - observ_AV3(2).failures; cond_distr_params(17).steps = cond_distr_params(2).steps; cond_distr_params(18).partition = 3; cond_distr_params(18).alfa = cond_distr_params(3).alfa + observ_AV3(3).failures; cond_distr_params(18).beta = cond_distr_params(3).beta + observ_AV3(3).miles - observ_AV3(3).failures; cond_distr_params(18).steps = cond_distr_params(3).steps; cond_distr_params(19).partition = 4; cond_distr_params(19).alfa = cond_distr_params(4).alfa + observ_AV3(4).failures; cond_distr_params(19).beta = cond_distr_params(4).beta + observ_AV3(4).miles - observ_AV3(4).failures; cond_distr_params(19).steps = cond_distr_params(4).steps; cond_distr_params(20).partition = 5; cond_distr_params(20).alfa = cond_distr_params(5).alfa + observ_AV3(5).failures; cond_distr_params(20).beta = cond_distr_params(5).beta + observ_AV3(5).miles - observ_AV3(5).failures; cond_distr_params(20).steps = cond_distr_params(5).steps; alpha_obs_AV3 = alpha; for i=1:length(alpha), alpha_obs_AV3(i) = alpha_obs_AV3(i) + observ_AV3(i).miles; end % AV4 - Update Beta parameters cond_distr_params(21).partition = 1; cond_distr_params(21).alfa = cond_distr_params(1).alfa + observ_AV4(1).failures; cond_distr_params(21).beta = cond_distr_params(1).beta + observ_AV4(1).miles - observ_AV4(1).failures; cond_distr_params(21).steps = cond_distr_params(1).steps; cond_distr_params(22).partition = 2; cond_distr_params(22).alfa = cond_distr_params(2).alfa + observ_AV4(2).failures; cond_distr_params(22).beta = cond_distr_params(2).beta + observ_AV4(2).miles - observ_AV4(2).failures; cond_distr_params(22).steps = cond_distr_params(2).steps; cond_distr_params(23).partition = 3; cond_distr_params(23).alfa = cond_distr_params(3).alfa + observ_AV4(3).failures; cond_distr_params(23).beta = cond_distr_params(3).beta + observ_AV4(3).miles - observ_AV4(3).failures; cond_distr_params(23).steps = cond_distr_params(3).steps; cond_distr_params(24).partition = 4; cond_distr_params(24).alfa = cond_distr_params(4).alfa + observ_AV4(4).failures; cond_distr_params(24).beta = cond_distr_params(4).beta + observ_AV4(4).miles - observ_AV4(4).failures; cond_distr_params(24).steps = cond_distr_params(4).steps; cond_distr_params(25).partition = 5; cond_distr_params(25).alfa = cond_distr_params(5).alfa + observ_AV4(5).failures; cond_distr_params(25).beta = cond_distr_params(5).beta + observ_AV4(5).miles - observ_AV4(5).failures; cond_distr_params(25).steps = cond_distr_params(5).steps; alpha_obs_AV4 = alpha; for i=1:length(alpha), alpha_obs_AV4(i) = alpha_obs_AV4(i) + observ_AV4(i).miles; end alpha_obs_AV4_fail = alpha_obs_AV4; % AV5 - Update Beta parameters cond_distr_params(26).partition = 1; cond_distr_params(26).alfa = cond_distr_params(1).alfa + observ_AV5(1).failures; cond_distr_params(26).beta = cond_distr_params(1).beta + observ_AV5(1).miles - observ_AV5(1).failures; cond_distr_params(26).steps = cond_distr_params(1).steps; cond_distr_params(27).partition = 2; cond_distr_params(27).alfa = cond_distr_params(2).alfa + observ_AV5(2).failures; cond_distr_params(27).beta = cond_distr_params(2).beta + observ_AV5(2).miles - observ_AV5(2).failures; cond_distr_params(27).steps = cond_distr_params(2).steps; cond_distr_params(28).partition = 3; cond_distr_params(28).alfa = cond_distr_params(3).alfa + observ_AV5(3).failures; cond_distr_params(28).beta = cond_distr_params(3).beta + observ_AV5(3).miles - observ_AV5(3).failures; cond_distr_params(28).steps = cond_distr_params(3).steps; cond_distr_params(29).partition = 4; cond_distr_params(29).alfa = cond_distr_params(4).alfa + observ_AV5(4).failures; cond_distr_params(29).beta = cond_distr_params(4).beta + observ_AV5(4).miles - observ_AV5(4).failures; cond_distr_params(29).steps = cond_distr_params(4).steps; cond_distr_params(30).partition = 5; cond_distr_params(30).alfa = cond_distr_params(5).alfa + observ_AV5(5).failures; cond_distr_params(30).beta = cond_distr_params(5).beta + observ_AV5(5).miles - observ_AV5(5).failures; cond_distr_params(30).steps = cond_distr_params(5).steps; alpha_obs_AV5 = alpha; for i=1:length(alpha), alpha_obs_AV5(i) = alpha_obs_AV5(i) + observ_AV5(i).miles; end alpha_obs_AV5_fail = alpha_obs_AV5; % AV Vendor - Update Beta parameters cond_distr_params(31).partition = 1; cond_distr_params(31).alfa = cond_distr_params(1).alfa + observ_all(1).failures; cond_distr_params(31).beta = cond_distr_params(1).beta + observ_all(1).miles - observ_all(1).failures; cond_distr_params(31).steps = cond_distr_params(1).steps; cond_distr_params(32).partition = 2; cond_distr_params(32).alfa = cond_distr_params(2).alfa + observ_all(2).failures; cond_distr_params(32).beta = cond_distr_params(2).beta + observ_all(2).miles - observ_all(2).failures; cond_distr_params(32).steps = cond_distr_params(2).steps; cond_distr_params(33).partition = 3; cond_distr_params(33).alfa = cond_distr_params(3).alfa + observ_all(3).failures; cond_distr_params(33).beta = cond_distr_params(3).beta + observ_all(3).miles - observ_all(3).failures; cond_distr_params(33).steps = cond_distr_params(3).steps; cond_distr_params(34).partition = 4; cond_distr_params(34).alfa = cond_distr_params(4).alfa + observ_all(4).failures; cond_distr_params(34).beta = cond_distr_params(4).beta + observ_all(4).miles - observ_all(4).failures; cond_distr_params(34).steps = cond_distr_params(4).steps; cond_distr_params(35).partition = 5; cond_distr_params(35).alfa = cond_distr_params(5).alfa + observ_all(5).failures; cond_distr_params(35).beta = cond_distr_params(5).beta + observ_all(5).miles - observ_all(5).failures; cond_distr_params(35).steps = cond_distr_params(5).steps; alpha_obs_all = alpha; for i=1:length(alpha), alpha_obs_all(i) = alpha_obs_all(i) + observ_all(i).miles; end % AV3 - Update Beta() parameters for observations with failures cond_distr_params(36).partition = 1; cond_distr_params(36).alfa = cond_distr_params(1).alfa + observ_AV3_fail(1).failures; cond_distr_params(36).beta = cond_distr_params(1).beta + observ_AV3_fail(1).miles - observ_AV3_fail(1).failures; cond_distr_params(36).steps = cond_distr_params(1).steps; cond_distr_params(37).partition = 2; cond_distr_params(37).alfa = cond_distr_params(2).alfa + observ_AV3_fail(2).failures; cond_distr_params(37).beta = cond_distr_params(2).beta + observ_AV3_fail(2).miles - observ_AV3_fail(2).failures; cond_distr_params(37).steps = cond_distr_params(2).steps; cond_distr_params(38).partition = 3; cond_distr_params(38).alfa = cond_distr_params(3).alfa + observ_AV3_fail(3).failures; cond_distr_params(38).beta = cond_distr_params(3).beta + observ_AV3_fail(3).miles - observ_AV3_fail(3).failures; cond_distr_params(38).steps = cond_distr_params(3).steps; cond_distr_params(39).partition = 4; cond_distr_params(39).alfa = cond_distr_params(4).alfa + observ_AV3_fail(4).failures; cond_distr_params(39).beta = cond_distr_params(4).beta + observ_AV3_fail(4).miles - observ_AV3_fail(4).failures; cond_distr_params(39).steps = cond_distr_params(4).steps; cond_distr_params(40).partition = 5; cond_distr_params(40).alfa = cond_distr_params(5).alfa + observ_AV3_fail(5).failures; cond_distr_params(40).beta = cond_distr_params(5).beta + observ_AV3_fail(5).miles - observ_AV3_fail(5).failures; cond_distr_params(40).steps = cond_distr_params(5).steps; alpha_obs_AV3_fail = alpha; for i=1:length(alpha), alpha_obs_AV3_fail(i) = alpha_obs_AV3_fail(i) + observ_AV3_fail(i).miles; end % AV Vendor - Update Beta parameters cond_distr_params(41).partition = 1; cond_distr_params(41).alfa = cond_distr_params(1).alfa + observ_all_fail(1).failures; cond_distr_params(41).beta = cond_distr_params(1).beta + observ_all_fail(1).miles - observ_all_fail(1).failures; cond_distr_params(41).steps = cond_distr_params(1).steps; cond_distr_params(42).partition = 2; cond_distr_params(42).alfa = cond_distr_params(2).alfa + observ_all_fail(2).failures; cond_distr_params(42).beta = cond_distr_params(2).beta + observ_all_fail(2).miles - observ_all_fail(2).failures; cond_distr_params(42).steps = cond_distr_params(2).steps; cond_distr_params(43).partition = 3; cond_distr_params(43).alfa = cond_distr_params(3).alfa + observ_all_fail(3).failures; cond_distr_params(43).beta = cond_distr_params(3).beta + observ_all_fail(3).miles - observ_all_fail(3).failures; cond_distr_params(43).steps = cond_distr_params(3).steps; cond_distr_params(44).partition = 4; cond_distr_params(44).alfa = cond_distr_params(4).alfa + observ_all_fail(4).failures; cond_distr_params(44).beta = cond_distr_params(4).beta + observ_all_fail(4).miles - observ_all_fail(4).failures; cond_distr_params(44).steps = cond_distr_params(4).steps; cond_distr_params(45).partition = 5; cond_distr_params(45).alfa = cond_distr_params(5).alfa + observ_all_fail(5).failures; cond_distr_params(45).beta = cond_distr_params(5).beta + observ_all_fail(5).miles - observ_all_fail(5).failures; cond_distr_params(45).steps = cond_distr_params(5).steps; alpha_obs_all_fail = alpha; for i=1:length(alpha), alpha_obs_all_fail(i) = alpha_obs_all_fail(i) + observ_all_fail(i).miles; end % Create placeholders for AV1 - AV5 posteriors with (fleet data from the % vendor). for i=6:45, % generate the posterior Betas for the sets of observations (AV1 - AV5 + for the vendor). % get the distrbutions of the conditional probabilities of failure cond_distr_params(i).pdf = gen_beta_m(cond_distr_params(i).alfa,cond_distr_params(i).beta,cond_distr_params(i).steps); end % Now calculate the posterior Dirichlet distributions for the observations % (AV1 - AV5 + Vendor) integral_obs_AV1 = double(0); integral_obs_AV1_fail = double(0); integral_obs_AV2 = double(0); integral_obs_AV3 = double(0); integral_obs_AV3_fail = double(0); integral_obs_AV4 = double(0); integral_obs_AV5 = double(0); integral_obs_all = double(0); integral_obs_all_fail = double(0); ind_space_obs_AV1 = ind_space; ind_space_obs_AV1_fail = ind_space; ind_space_obs_AV2 = ind_space; ind_space_obs_AV3 = ind_space; ind_space_obs_AV3_fail = ind_space; % work with AV3 with failures ind_space_obs_AV4 = ind_space; ind_space_obs_AV5 = ind_space; ind_space_obs_all = ind_space; ind_space_obs_all_fail = ind_space; % work with Vendor with failures for i=1:count, inds_1 = ind_space_obs_AV1(i).indeces; inds_1_fail = ind_space_obs_AV1_fail(i).indeces; inds_2 = ind_space_obs_AV2(i).indeces; inds_3 = ind_space_obs_AV3(i).indeces; inds_3_fail = ind_space_obs_AV3_fail(i).indeces; inds_4 = ind_space_obs_AV4(i).indeces; inds_5 = ind_space_obs_AV5(i).indeces; inds_all = ind_space_obs_all(i).indeces; inds_all_fail = ind_space_obs_all_fail(i).indeces; x_1 = double(inds_1) / double(steps); x_1_fail = double(inds_1_fail) / double(steps); x_2 = double(inds_2) / double(steps); x_3 = double(inds_3) / double(steps); x_3_fail = double(inds_3_fail) / double(steps); x_4 = double(inds_4) / double(steps); x_5 = double(inds_5) / double(steps); x_all = double(inds_all) / double(steps); x_all_fail = double(inds_all_fail) / double(steps); display(x_1); display(x_1_fail); display(x_2); display(x_3); display(x_3_fail); display(x_4); display(x_5); display(x_all); display(x_all_fail); ind_space_obs_AV1(i).x = x_1; ind_space_obs_AV1_fail(i).x = x_1_fail; ind_space_obs_AV2(i).x = x_2; ind_space_obs_AV3(i).x = x_3; ind_space_obs_AV3_fail(i).x = x_3_fail; ind_space_obs_AV4(i).x = x_4; ind_space_obs_AV5(i).x = x_5; ind_space_obs_all(i).x = x_all; ind_space_obs_all_fail(i).x = x_all_fail; D_obs1 = dirichlet_robust(x_1,alpha_obs_AV1); D_obs1_fail = dirichlet_robust(x_1_fail,alpha_obs_AV1_fail); D_obs2 = dirichlet_robust(x_2,alpha_obs_AV2); D_obs3 = dirichlet_robust(x_3,alpha_obs_AV3); D_obs3_fail = dirichlet_robust(x_3_fail,alpha_obs_AV3_fail); D_obs4 = dirichlet_robust(x_4,alpha_obs_AV4); D_obs5 = dirichlet_robust(x_5,alpha_obs_AV5); D_obs_all = dirichlet_robust(x_all,alpha_obs_all); D_obs_all_fail = dirichlet_robust(x_all_fail,alpha_obs_all_fail); ind_space_obs_AV1(i).pdf = D_obs1; ind_space_obs_AV1_fail(i).pdf = D_obs1_fail; ind_space_obs_AV2(i).pdf = D_obs2; ind_space_obs_AV3(i).pdf = D_obs3; ind_space_obs_AV3_fail(i).pdf = D_obs3_fail; ind_space_obs_AV4(i).pdf = D_obs4; ind_space_obs_AV5(i).pdf = D_obs5; ind_space_obs_all(i).pdf = D_obs_all; ind_space_obs_all_fail(i).pdf = D_obs_all_fail; display(D_obs1); display(D_obs1_fail); display(D_obs2); display(D_obs3); display(D_obs3_fail); display(D_obs4); display(D_obs5); display(D_obs_all); display(D_obs_all_fail); ind_space_obs_AV1(i).volume = D_obs1 * vol_unit; integral_obs_AV1 = integral_obs_AV1 + D_obs1 * vol_unit; ind_space_obs_AV1_fail(i).volume = D_obs1_fail * vol_unit; integral_obs_AV1_fail = integral_obs_AV1_fail + D_obs1_fail * vol_unit; ind_space_obs_AV2(i).volume = D_obs2 * vol_unit; integral_obs_AV2 = integral_obs_AV2 + D_obs2 * vol_unit; ind_space_obs_AV3(i).volume = D_obs3 * vol_unit; integral_obs_AV3 = integral_obs_AV3 + D_obs3 * vol_unit; ind_space_obs_AV3_fail(i).volume = D_obs3_fail * vol_unit; integral_obs_AV3_fail = integral_obs_AV3_fail + D_obs3_fail * vol_unit; ind_space_obs_AV4(i).volume = D_obs4 * vol_unit; integral_obs_AV4 = integral_obs_AV4 + D_obs4 * vol_unit; ind_space_obs_AV5(i).volume = D_obs5 * vol_unit; integral_obs_AV5 = integral_obs_AV5 + D_obs5 * vol_unit; ind_space_obs_all(i).volume = D_obs_all * vol_unit; integral_obs_all = integral_obs_all + D_obs_all * vol_unit; ind_space_obs_all_fail(i).volume = D_obs_all_fail * vol_unit; integral_obs_all_fail = integral_obs_all_fail + D_obs_all_fail * vol_unit; end display(integral_obs_AV1); display(integral_obs_AV1_fail); display(integral_obs_AV2); display(integral_obs_AV3); display(integral_obs_AV3_fail); display(integral_obs_AV4); display(integral_obs_AV5); display(integral_obs_all); display(integral_obs_all_fail); integral_2_obs_AV1 = double(0); integral_2_obs_AV1_fail = double(0); integral_2_obs_AV2 = double(0); integral_2_obs_AV3 = double(0); integral_2_obs_AV3_fail = double(0); integral_2_obs_AV4 = double(0); integral_2_obs_AV5 = double(0); integral_2_obs_all = double(0); integral_2_obs_all_fail = double(0); for i=1:count, ind_space_obs_AV1(i).volume = ind_space_obs_AV1(i).volume / integral_obs_AV1; % compensate rounding errors and set the integral to 1. integral_2_obs_AV1 = integral_2_obs_AV1 + ind_space_obs_AV1(i).volume; ind_space_obs_AV1_fail(i).volume = ind_space_obs_AV1_fail(i).volume / integral_obs_AV1_fail; % compensate rounding errors and set the integral to 1. integral_2_obs_AV1_fail = integral_2_obs_AV1_fail + ind_space_obs_AV1_fail(i).volume; ind_space_obs_AV2(i).volume = ind_space_obs_AV2(i).volume / integral_obs_AV2; % compensate rounding errors and set the integral to 1. integral_2_obs_AV2 = integral_2_obs_AV2 + ind_space_obs_AV2(i).volume; ind_space_obs_AV3(i).volume = ind_space_obs_AV3(i).volume / integral_obs_AV3; % compensate rounding errors and set the integral to 1. integral_2_obs_AV3 = integral_2_obs_AV3 + ind_space_obs_AV3(i).volume; ind_space_obs_AV3_fail(i).volume = ind_space_obs_AV3_fail(i).volume / integral_obs_AV3_fail; % compensate rounding errors and set the integral to 1. integral_2_obs_AV3_fail = integral_2_obs_AV3_fail + ind_space_obs_AV3_fail(i).volume; ind_space_obs_AV4(i).volume = ind_space_obs_AV4(i).volume / integral_obs_AV4; % compensate rounding errors and set the integral to 1. integral_2_obs_AV4 = integral_2_obs_AV4 + ind_space_obs_AV4(i).volume; ind_space_obs_AV5(i).volume = ind_space_obs_AV4(i).volume / integral_obs_AV5; % compensate rounding errors and set the integral to 1. integral_2_obs_AV5 = integral_2_obs_AV5 + ind_space_obs_AV5(i).volume; ind_space_obs_all(i).volume = ind_space_obs_all(i).volume / integral_obs_all; % compensate rounding errors and set the integral to 1. integral_2_obs_all = integral_2_obs_all + ind_space_obs_all(i).volume; ind_space_obs_all_fail(i).volume = ind_space_obs_all_fail(i).volume / integral_obs_all_fail; % compensate rounding errors and set the integral to 1. integral_2_obs_all_fail = integral_2_obs_all_fail + ind_space_obs_all_fail(i).volume; end display('integral_2_obs_AV1 = ') display(integral_2_obs_AV1); display('integral_2_obs_AV1_fail = ') display(integral_2_obs_AV1_fail); display('integral_2_obs_AV2 = ') display(integral_2_obs_AV2); display('integral_2_obs_AV3 = ') display(integral_2_obs_AV3); display('integral_2_obs_AV3_fail = ') display(integral_2_obs_AV3_fail); display('integral_2_obs_AV4 = ') display(integral_2_obs_AV4); display('integral_2_obs_AV5 = ') display(integral_2_obs_AV5); display('integral_2_obs_all = ') display(integral_2_obs_all); display('integral_2_obs_all_fail = ') display(integral_2_obs_all_fail); % Now for AV1 - AV5 need to compute the posteriors for the miles/failures % observed by the vendor. % Best to use the conditional distributions computed for the vendor when % computing the marginal posterior (fleet data). % Now get the marginal posterior distributions post_marg_1 = Lin_Mat(cond_distr_params(1).steps); % White box inference AV1 (own data only) post_marg_1_full = Lin_Mat(cond_distr_params(1).steps); % White box inference AV1 (fleet data) post_marg_1_full_fail = Lin_Mat(cond_distr_params(1).steps); % White box inference AV1 (fleet data) post_marg_2 = Lin_Mat(cond_distr_params(1).steps); % White box inference AV2 (own data only) post_marg_2_full = Lin_Mat(cond_distr_params(1).steps); % White box inference AV2 (fleet data) post_marg_3 = Lin_Mat(cond_distr_params(1).steps); % White box inference AV3 (own data only) post_marg_3_full = Lin_Mat(cond_distr_params(1).steps); % White box inference AV3 (fleet data) post_marg_3_fail = Lin_Mat(cond_distr_params(1).steps); % White box inference AV3 fail (own data only) post_marg_3_full_fail = Lin_Mat(cond_distr_params(1).steps);% White box inference AV3 fail (fleet data) post_marg_4 = Lin_Mat(cond_distr_params(1).steps); % White box inference AV4 (own data only) post_marg_4_full = Lin_Mat(cond_distr_params(1).steps); % White box inference AV4 (fleet data) post_marg_5 = Lin_Mat(cond_distr_params(1).steps); % White box inference AV5 (own data only) post_marg_5_full = Lin_Mat(cond_distr_params(1).steps); % White box inference AV5 (fleet data) post_marg_all = Lin_Mat(cond_distr_params(1).steps); % White box inference Vendor (fleet data ) post_marg_all_fail = Lin_Mat(cond_distr_params(1).steps); % White box inference Vendor fail (fleet data ) % Need to update the marginal distributions. for i=1:count, for j=1:dims, c_dist_1 = gen_beta_scaled(cond_distr_params(j+5).alfa,cond_distr_params(j+5).beta,ind_space_obs_AV1(i).x(j),cond_distr_params(j+5).steps); c_dist_2 = gen_beta_scaled(cond_distr_params(j+10).alfa,cond_distr_params(j+10).beta,ind_space_obs_AV2(i).x(j),cond_distr_params(j+10).steps); c_dist_3 = gen_beta_scaled(cond_distr_params(j+15).alfa,cond_distr_params(j+15).beta,ind_space_obs_AV3(i).x(j),cond_distr_params(j+15).steps); c_dist_3_fail = gen_beta_scaled(cond_distr_params(j+15).alfa,cond_distr_params(j+15).beta,ind_space_obs_AV3_fail(i).x(j),cond_distr_params(j+15).steps); c_dist_4 = gen_beta_scaled(cond_distr_params(j+20).alfa,cond_distr_params(j+20).beta,ind_space_obs_AV4(i).x(j),cond_distr_params(j+20).steps); c_dist_5 = gen_beta_scaled(cond_distr_params(j+25).alfa,cond_distr_params(j+25).beta,ind_space_obs_AV5(i).x(j),cond_distr_params(j+25).steps); c_dist_all = gen_beta_scaled(cond_distr_params(j+30).alfa,cond_distr_params(j+30).beta,ind_space_obs_all(i).x(j),cond_distr_params(j+30).steps); c_dist_all_fail = gen_beta_scaled(cond_distr_params(j+30).alfa,cond_distr_params(j+30).beta,ind_space_obs_all_fail(i).x(j),cond_distr_params(j+30).steps); c_dist_1_full = c_dist_all; % AV1 with fleet data c_dist_1_full_fail = c_dist_all_fail; % AV1 with fleet data c_dist_2_full = c_dist_all; % AV2 with fleet data c_dist_3_full = c_dist_all; % AV3 with fleet data c_dist_3_full_fail = c_dist_all_fail; % AV3 with fleet data c_dist_4_full = c_dist_all; % AV4 with fleet data c_dist_5_full = c_dist_all; % AV5 with fleet data if(j==1) post_mg_1 = c_dist_1; % marg_conv post_mg_2 = c_dist_2; post_mg_3 = c_dist_3; post_mg_3_fail = c_dist_3_fail; post_mg_4 = c_dist_4; post_mg_5 = c_dist_5; post_mg_all = c_dist_all; post_mg_all_fail = c_dist_all_fail; post_mg_1_full = c_dist_1_full; post_mg_1_full_fail = c_dist_1_full_fail; post_mg_2_full = c_dist_2_full; post_mg_3_full = c_dist_3_full; post_mg_3_full_fail = c_dist_3_full_fail; post_mg_4_full = c_dist_4_full; post_mg_5_full = c_dist_5_full; else post_mg_1 = conv(post_mg_1,c_dist_1); post_mg_1(length(post_mg_1)+1) = double(0); post_mg_2 = conv(post_mg_2,c_dist_2); post_mg_2(length(post_mg_2)+1) = double(0); post_mg_3 = conv(post_mg_3,c_dist_3); post_mg_3(length(post_mg_3)+1) = double(0); post_mg_3_fail = conv(post_mg_3_fail,c_dist_3_fail); post_mg_3_fail(length(post_mg_3_fail)+1) = double(0); post_mg_4 = conv(post_mg_4,c_dist_4); post_mg_4(length(post_mg_4)+1) = double(0); post_mg_5 = conv(post_mg_5,c_dist_5); post_mg_5(length(post_mg_5)+1) = double(0); post_mg_all = conv(post_mg_all,c_dist_all); post_mg_all(length(post_mg_all)+1) = double(0); post_mg_all_fail = conv(post_mg_all_fail,c_dist_all_fail); post_mg_all_fail(length(post_mg_all_fail)+1) = double(0); post_mg_1_full = conv(post_mg_1_full,c_dist_1_full); post_mg_1_full(length(post_mg_1_full)+1) = double(0); post_mg_1_full_fail = conv(post_mg_1_full_fail,c_dist_1_full_fail); post_mg_1_full_fail(length(post_mg_1_full_fail)+1) = double(0); post_mg_2_full = conv(post_mg_2_full,c_dist_2_full); post_mg_2_full(length(post_mg_2_full)+1) = double(0); post_mg_3_full = conv(post_mg_3_full,c_dist_3_full); post_mg_3_full(length(post_mg_3_full)+1) = double(0); post_mg_3_full_fail = conv(post_mg_3_full_fail,c_dist_3_full_fail); post_mg_3_full_fail(length(post_mg_3_full_fail)+1) = double(0); post_mg_4_full = conv(post_mg_4_full,c_dist_4_full); post_mg_4_full(length(post_mg_4_full)+1) = double(0); post_mg_5_full = conv(post_mg_5_full,c_dist_5_full); post_mg_5_full(length(post_mg_5_full)+1) = double(0); end end % now apply the weigth to this convolution post_mg_1 = post_mg_1 * ind_space_obs_AV1(i).volume; post_mg_2 = post_mg_2 * ind_space_obs_AV2(i).volume; post_mg_3 = post_mg_3 * ind_space_obs_AV3(i).volume; post_mg_3_fail = post_mg_3_fail * ind_space_obs_AV3_fail(i).volume; post_mg_4 = post_mg_4 * ind_space_obs_AV4(i).volume; post_mg_5 = post_mg_5 * ind_space_obs_AV5(i).volume; post_mg_all = post_mg_all * ind_space_obs_all(i).volume; post_mg_all_fail = post_mg_all_fail * ind_space_obs_all_fail(i).volume; post_mg_1_full = post_mg_1_full * ind_space_obs_all(i).volume; post_mg_1_full_fail = post_mg_1_full_fail * ind_space_obs_all_fail(i).volume; post_mg_2_full = post_mg_2_full * ind_space_obs_all(i).volume; post_mg_3_full = post_mg_3_full * ind_space_obs_all(i).volume; post_mg_3_full_fail = post_mg_3_full_fail * ind_space_obs_all_fail(i).volume; post_mg_4_full = post_mg_4_full * ind_space_obs_all(i).volume; post_mg_5_full = post_mg_5_full * ind_space_obs_all(i).volume; % add add it to the marginal distribution post_marg_1 = post_marg_1 + post_mg_1; post_marg_2 = post_marg_2 + post_mg_2; post_marg_3 = post_marg_3 + post_mg_3; post_marg_3_fail = post_marg_3_fail + post_mg_3_fail; post_marg_4 = post_marg_4 + post_mg_4; post_marg_5 = post_marg_5 + post_mg_5; post_marg_all = post_marg_all + post_mg_all; post_marg_all_fail = post_marg_all_fail + post_mg_all_fail; post_marg_1_full = post_marg_1_full + post_mg_1_full; post_marg_1_full_fail = post_marg_1_full_fail + post_mg_1_full_fail; post_marg_2_full = post_marg_2_full + post_mg_2_full; post_marg_3_full = post_marg_3_full + post_mg_3_full; post_marg_3_full_fail = post_marg_3_full_fail + post_mg_3_full_fail; post_marg_4_full = post_marg_4_full + post_mg_4_full; post_marg_5_full = post_marg_5_full + post_mg_5_full; end display(sum(post_marg_1)); display(sum(post_marg_2)); display(sum(post_marg_3)); display(sum(post_marg_3_fail)); display(sum(post_marg_4)); display(sum(post_marg_5)); display(sum(post_marg_all)); display(sum(post_marg_all_fail)); display(sum(post_marg_1_full)); display(sum(post_marg_1_full_fail)); display(sum(post_marg_2_full)); display(sum(post_marg_3_full)); display(sum(post_marg_3_full_fail)); display(sum(post_marg_4_full)); display(sum(post_marg_5_full)); % May need to normalise the marginal posteriors. % Now need to conduct black-box inferences for AV1 - AV5 and for the % vendor. AV 1 - AV5 will compute these using own observations only. % AV1 structures plot_array_descr(20).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(21).Plot.Y = marginal_distr; % Black-box posterior (oun data) plot_array_descr(21) = BlackBoxBayesianInference(plot_array_descr(21), total_failures(1), total_miles(1)); % Modify LD of the black-box % plot_array_descr(21).Plot.LD = 'BB marginal posterior PFM (AV1: own data)'; plot_array_descr(22).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(22) = BlackBoxBayesianInference(plot_array_descr(22), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(22).Plot.LD = 'BB marginal posterior PFM (AV1: fleet data)'; plot_array_descr(23).Plot.Y = post_marg_1; % White-box posterior (oun data) plot_array_descr(24).Plot.Y = post_marg_1_full; % White-box posterior (fleet data) % AV2 structures plot_array_descr(25).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(26).Plot.Y = marginal_distr; % Black-box posterior (oun data) plot_array_descr(26) = BlackBoxBayesianInference(plot_array_descr(26), total_failures(2), total_miles(2)); % Modify LD of the black-box % plot_array_descr(26).Plot.LD = 'BB marginal posterior PFM (AV2: own data)'; plot_array_descr(27).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(27) = BlackBoxBayesianInference(plot_array_descr(27), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(27).Plot.LD = 'BB marginal posterior PFM (AV2: fleet data)'; plot_array_descr(28).Plot.Y = post_marg_2; % White-box posterior (oun data) plot_array_descr(29).Plot.Y = post_marg_2_full; % White-box posterior (fleet data) % AV3 structures plot_array_descr(30).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(31).Plot.Y = marginal_distr; % Black-box posterior (oun data) plot_array_descr(31) = BlackBoxBayesianInference(plot_array_descr(31), total_failures(3), total_miles(3)); % Modify LD of the black-box % plot_array_descr(31).Plot.LD = 'BB marginal posterior PFM (AV3: own data)'; plot_array_descr(32).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(32) = BlackBoxBayesianInference(plot_array_descr(32), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(32).Plot.LD = 'BB marginal posterior PFM (AV3: fleet data)'; plot_array_descr(33).Plot.Y = post_marg_3; % White-box posterior (oun data) plot_array_descr(34).Plot.Y = post_marg_3_full; % White-box posterior (fleet data) % AV4 structures plot_array_descr(35).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(36).Plot.Y = marginal_distr; % Black-box posterior (oun data) plot_array_descr(36) = BlackBoxBayesianInference(plot_array_descr(36), total_failures(4), total_miles(4)); % Modify LD of the black-box % plot_array_descr(36).Plot.LD = 'BB marginal posterior PFM (AV4: own data)'; plot_array_descr(37).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(37) = BlackBoxBayesianInference(plot_array_descr(37), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(37).Plot.LD = 'BB marginal posterior PFM (AV4: fleet data)'; plot_array_descr(38).Plot.Y = post_marg_4; % White-box posterior (oun data) plot_array_descr(39).Plot.Y = post_marg_4_full; % White-box posterior (fleet data) % AV5 structures plot_array_descr(40).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(41).Plot.Y = marginal_distr; % Black-box posterior (oun data) plot_array_descr(41) = BlackBoxBayesianInference(plot_array_descr(41), total_failures(5), total_miles(5)); % Modify LD of the black-box % plot_array_descr(41).Plot.LD = 'BB marginal posterior PFM (AV5: own data)'; plot_array_descr(42).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(42) = BlackBoxBayesianInference(plot_array_descr(42), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(43).Plot.Plot.LD = 'BB marginal posterior PFM (AV5: fleet data)'; plot_array_descr(43).Plot.Y = post_marg_5; % White-box posterior (own data) plot_array_descr(44).Plot.Y = post_marg_5_full; % White-box posterior (fleet data) % Vendor structures plot_array_descr(45).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(46).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(46) = BlackBoxBayesianInference(plot_array_descr(46), vendor_total_failures, vendor_total_miles); % Modify LD of the black-box % plot_array_descr(47).Plot.LD = 'WB marginal posterior PFM (Vendor: fleet data)'; plot_array_descr(47).Plot.Y = post_marg_all; % white-box posterior (fleet data) % Results with failures % AV1 48 - BB, 49 - WB plot_array_descr(48).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(48) = BlackBoxBayesianInference(plot_array_descr(48), vendor_total_failures_fail, vendor_total_miles_fail); % Modify LD of the black-box % plot_array_descr(48).Plot.LD = 'BB marginal posterior PFM (AV1: fleet data with failures)'; plot_array_descr(49).Plot.Y = post_marg_1_full_fail; % White-box posterior (fleet data) % AV3 52 - BB (own), 53 - BB (all), 54 - WB (own), 55 - WB (all) plot_array_descr(52).Plot.Y = marginal_distr; % Should be set to the marginal prior. plot_array_descr(52) = BlackBoxBayesianInference(plot_array_descr(31), total_failures(3), total_miles(3)); % Modify LD of the black-box % plot_array_descr(52).Plot.LD = 'BB marginal posterior PFM (AV2: own data with failures)'; plot_array_descr(53).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(53) = BlackBoxBayesianInference(plot_array_descr(53), vendor_total_failures_fail, vendor_total_miles_fail); % Modify LD of the black-box % plot_array_descr(53).Plot.LD = 'BB marginal posterior PFM (AV3: fleet data with failures)'; % Modify LD of the black-box plot_array_descr(54).Plot.Y = post_marg_3_fail; % White-box posterior (own data) % plot_array_descr(54).Plot.LD = 'WB marginal posterior PFM (AV3: own data with failures)'; % Modify LD of the black-box plot_array_descr(55).Plot.Y = post_marg_3_full_fail; % White-box posterior (fleet data) % plot_array_descr(55).Plot.LD = 'WB marginal posterior PFM (AV3: fleet data with failures)'; % Vendor 60 - BB, 61 - WB plot_array_descr(60).Plot.Y = marginal_distr; % Black-box posterior (fleet data) plot_array_descr(60) = BlackBoxBayesianInference(plot_array_descr(60), vendor_total_failures_fail, vendor_total_miles_fail); % Modify LD of the black-box % plot_array_descr(60).Plot.LD = 'BB marginal posterior PFM (Vendor: fleet data with failures)'; plot_array_descr(61).Plot.Y = post_marg_all_fail; % white-box posterior (fleet data) clear Data; % Pring the results clear Data; P60(1) = plot_array_descr(20); % Marginal Prior AV1 P60(2) = plot_array_descr(21); % BB marginal posterior AV1 (own data) P60(3) = plot_array_descr(22); % BB marginal posterior AV1 (fleet data) P60(4) = plot_array_descr(23); % WB marginal posterior AV1 (own data) P60(5) = plot_array_descr(24); % WB marginal posterior AV1 (fleet data) Data(1).Plot = P60; Data(1).xlabel = P60(1).Plot.XLabel; Data(1).ylabel = P60(1).Plot.YLabel; Data(1).xlim = 0.01; Data(1).title = 'AV1: White-box vs Black-box inference'; P61(1) = plot_array_descr(25); % Marginal Prior AV2 P61(2) = plot_array_descr(26); % BB marginal posterior AV2 (own data) P61(3) = plot_array_descr(27); % BB marginal posterior AV2 (fleet data) P61(4) = plot_array_descr(28); % WB marginal posterior AV2 (own data) P61(5) = plot_array_descr(29); % WB marginal posterior AV2 (fleet data) Data(2).Plot = P61; Data(2).xlabel = P61(1).Plot.XLabel; Data(2).ylabel = P61(1).Plot.YLabel; Data(2).xlim = 0.01; Data(2).title = 'AV2: White-box vs Black-box inference'; P62(1) = plot_array_descr(30); % Marginal Prior AV3 P62(2) = plot_array_descr(31); % BB marginal posterior AV3 (own data) P62(3) = plot_array_descr(32); % BB marginal posterior AV3 (fleet data) P62(4) = plot_array_descr(33); % WB marginal posterior AV3 (own data) P62(5) = plot_array_descr(34); % WB marginal posterior AV3 (fleet data) Data(3).Plot = P62; Data(3).xlabel = P62(1).Plot.XLabel; Data(3).ylabel = P62(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'AV3: White-box vs Black-box inference'; P63(1) = plot_array_descr(35); % Marginal Prior AV4 P63(2) = plot_array_descr(36); % BB marginal posterior AV4 (own data) P63(3) = plot_array_descr(37); % BB marginal posterior AV4 (fleet data) P63(4) = plot_array_descr(38); % WB marginal posterior AV4 (own data) P63(5) = plot_array_descr(39); % WB marginal posterior AV4 (fleet data) Data(4).Plot = P63; Data(4).xlabel = P63(1).Plot.XLabel; Data(4).ylabel = P63(1).Plot.YLabel; Data(4).xlim = 0.01; Data(4).title = 'AV4: White-box vs Black-box inference'; P64(1) = plot_array_descr(40); % Marginal Prior AV5 P64(2) = plot_array_descr(41); % BB marginal posterior AV4 (own data) P64(3) = plot_array_descr(42); % BB marginal posterior AV4 (fleet data) P64(4) = plot_array_descr(43); % WB marginal posterior AV4 (own data) P64(5) = plot_array_descr(44); % WB marginal posterior AV4 (fleet data) Data(5).Plot = P64; Data(5).xlabel = P64(1).Plot.XLabel; Data(5).ylabel = P64(1).Plot.YLabel; Data(5).xlim = 0.015; Data(5).title = 'AV5: White-box vs Black-box inference'; P65(1) = plot_array_descr(45); % Marginal Prior Vendor P65(2) = plot_array_descr(46); % BB marginal posterior Vendor P65(3) = plot_array_descr(47); % WB marginal posterior Vendor Data(6).Plot = P65; Data(6).xlabel = P65(1).Plot.XLabel; Data(6).ylabel = P65(1).Plot.YLabel; Data(6).xlim = 0.01; Data(6).title = 'Vendor: White-box vs Black-box inference'; [fig_num,subplot_num] = plotting_subplots(30,Data,1,3,2); clear Data; P70(1) = plot_array_descr(20); % Marginal Prior AV1 P70(2) = plot_array_descr(21); % BB marginal posterior AV1 (own data) P70(3) = plot_array_descr(22); % BB marginal posterior AV1 (fleet data) P70(4) = plot_array_descr(23); % WB marginal posterior AV1 (own data) P70(5) = plot_array_descr(24); % WB marginal posterior AV1 (fleet data) P70(6) = plot_array_descr(48); % BB marginal posterior AV1 (fleet data, failures) P70(7) = plot_array_descr(49); % WB marginal posterior AV1 (fleet data, failures) Data(1).Plot = P70; Data(1).xlabel = P70(1).Plot.XLabel; Data(1).ylabel = P70(1).Plot.YLabel; Data(1).xlim = 0.01; Data(1).title = 'AV1: White-box vs Black-box, fleet failures'; P71(1) = plot_array_descr(30); % Marginal Prior AV3 P71(2) = plot_array_descr(31); % BB marginal posterior AV3 (own data) P71(3) = plot_array_descr(32); % BB marginal posterior AV3 (fleet data) P71(4) = plot_array_descr(33); % WB marginal posterior AV3 (own data) P71(5) = plot_array_descr(34); % WB marginal posterior AV3 (fleet data) P71(6) = plot_array_descr(52); % BB marginal posterior AV3 (own data, failures) P71(7) = plot_array_descr(53); % BB marginal posterior AV3 (fleet data, failures) P71(8) = plot_array_descr(54); % WB marginal posterior AV3 (own data, failures) P71(9) = plot_array_descr(55); % WB marginal posterior AV3 (fleet data, failures) Data(2).Plot = P71; Data(2).xlabel = P71(1).Plot.XLabel; Data(2).ylabel = P71(1).Plot.YLabel; Data(2).xlim = 0.01; Data(2).title = 'AV3: White-box vs Black-box, own/fleet failures'; P72(1) = plot_array_descr(45); % Marginal Prior Vendor P72(2) = plot_array_descr(46); % BB marginal posterior Vendor P72(3) = plot_array_descr(47); % BB marginal posterior Vendor P72(4) = plot_array_descr(60); % BB marginal posterior Vendor (failures) P72(5) = plot_array_descr(61); % WB marginal posterior Vendor (failures) Data(3).Plot = P72; Data(3).xlabel = P72(1).Plot.XLabel; Data(3).ylabel = P72(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'Vendor: White-box vs Black-box fleet failures'; P73(1) = plot_array_descr(20); % Marginal Prior (bootstraping) P73(2) = plot_array_descr(21); % AV1 BB marginal posterior (own data, failures). Fleet failures do not affect posterior. P73(3) = plot_array_descr(48); % AV1 BB marginal posterior (fleet data, failures) P73(4) = plot_array_descr(23); % AV1 WB marginal posterior (own data, fleet failures). Fleet failures do not affect posterior. P73(5) = plot_array_descr(49); % AV1 WB marginal posterior (fleet data, failures) Data(4).Plot = P73; Data(4).xlabel = P73(1).Plot.XLabel; Data(4).ylabel = P73(1).Plot.YLabel; Data(4).xlim = 0.01; Data(4).title = 'AV1: White-box vs Black-box with fleet failures'; P74(1) = plot_array_descr(20); % Marginal Prior (bootstraping) P74(2) = plot_array_descr(52); % AV3 BB marginal posterior (own data, failures). P74(3) = plot_array_descr(53); % AV3 BB marginal posterior (fleet data, failures) P74(4) = plot_array_descr(54); % AV3 WB marginal posterior (own data, fleet failures). Fleet failures do not affect posterior. P74(5) = plot_array_descr(55); % AV3 WB marginal posterior (fleet data, failures) Data(5).Plot = P74; Data(5).xlabel = P74(1).Plot.XLabel; Data(5).ylabel = P74(1).Plot.YLabel; Data(5).xlim = 0.01; Data(5).title = 'AV3: White-box vs Black-box with own failures'; P75(1) = plot_array_descr(20); % Marginal Prior (bootstraping) P75(2) = plot_array_descr(60); % Vendor BB marginal posterior (fleet failures). P75(3) = plot_array_descr(61); % Vendor WB marginal posterior (fleet failures) Data(6).Plot = P75; Data(6).xlabel = P75(1).Plot.XLabel; Data(6).ylabel = P75(1).Plot.YLabel; Data(6).xlim = 0.01; Data(6).title = 'Vendor: White-box vs Black-box with fleet failures'; [fig_num,subplot_num] = plotting_subplots(40,Data,1,3,2); clear Data; % Now move the PFM of the conditional probability of failure om OC1 - OC5 % from cond_distr_params(X).PFM tp the respective plot_array_descr() % structures. for i=1:40, plot_array_descr(62+i-1).Plot.X = plot_array_descr(1).Plot.X; plot_array_descr(62+i-1).Plot.Y = cond_distr_params(5+i).pdf; end P76(1) = plot_array_descr(1); % Conditional Prior (OC1) P76(2) = plot_array_descr(62); % AV1 Conditional Posterior (OC1) P76(3) = plot_array_descr(67); % AV2 Conditional Posterior (OC1) P76(4) = plot_array_descr(72); % AV3 Conditional Posterior (OC1) P76(5) = plot_array_descr(77); % AV4 Conditional Posterior (OC1) P76(6) = plot_array_descr(82); % AV5 Conditional Posterior (OC1) P76(7) = plot_array_descr(87); % Vendor Conditional Posterior (OC1) Data(1).Plot = P76; Data(1).xlabel = P76(1).Plot.XLabel; Data(1).ylabel = P76(1).Plot.YLabel; Data(1).xlim = 0.02; Data(1).title = 'OC1: Prior vs. Posterior PFM (no failures)'; P77(1) = plot_array_descr(2); % Conditional Prior (OC1) P77(2) = plot_array_descr(63); % AV1 Conditional Posterior (OC2) P77(3) = plot_array_descr(68); % AV2 Conditional Posterior (OC3) P77(4) = plot_array_descr(73); % AV3 Conditional Posterior (OC3) P77(5) = plot_array_descr(78); % AV4 Conditional Posterior (OC3) P77(6) = plot_array_descr(83); % AV5 Conditional Posterior (OC3) P77(7) = plot_array_descr(88); % Vendor Conditional Posterior (OC3) Data(2).Plot = P77; Data(2).xlabel = P77(1).Plot.XLabel; Data(2).ylabel = P77(1).Plot.YLabel; Data(2).xlim = 0.01; Data(2).title = 'OC2: Prior vs. Posterior PFM (no failures)'; P78(1) = plot_array_descr(3); % Conditional Prior (OC3) P78(2) = plot_array_descr(64); % AV1 Conditional Posterior (OC3) P78(3) = plot_array_descr(69); % AV2 Conditional Posterior (OC3) P78(4) = plot_array_descr(74); % AV3 Conditional Posterior (OC3) P78(5) = plot_array_descr(79); % AV4 Conditional Posterior (OC3) P78(6) = plot_array_descr(84); % AV5 Conditional Posterior (OC3) P78(7) = plot_array_descr(89); % Vendor Conditional Posterior (OC3) Data(3).Plot = P78; Data(3).xlabel = P78(1).Plot.XLabel; Data(3).ylabel = P78(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'OC3: Prior vs. Posterior PFM (no failures)'; P79(1) = plot_array_descr(4); % Conditional Prior (OC4) P79(2) = plot_array_descr(65); % AV1 Conditional Posterior (OC4) P79(3) = plot_array_descr(70); % AV2 Conditional Posterior (OC4) P79(4) = plot_array_descr(75); % AV3 Conditional Posterior (OC4) P79(5) = plot_array_descr(80); % AV4 Conditional Posterior (OC4) P79(6) = plot_array_descr(85); % AV5 Conditional Posterior (OC4) P79(7) = plot_array_descr(90); % Vendor Conditional Posterior (OC4) Data(4).Plot = P79; Data(4).xlabel = P79(1).Plot.XLabel; Data(4).ylabel = P79(1).Plot.YLabel; Data(4).xlim = 0.01; Data(4).title = 'OC4: Prior vs. Posterior PFM (no failures)'; P80(1) = plot_array_descr(5); % Conditional Prior (OC5) P80(2) = plot_array_descr(66); % AV1 Conditional Posterior (OC5) P80(3) = plot_array_descr(71); % AV2 Conditional Posterior (OC5) P80(4) = plot_array_descr(76); % AV3 Conditional Posterior (OC5) P80(5) = plot_array_descr(81); % AV4 Conditional Posterior (OC5) P80(6) = plot_array_descr(86); % AV5 Conditional Posterior (OC5) P80(7) = plot_array_descr(91); % Vendor Conditional Posterior (OC5) Data(5).Plot = P80; Data(5).xlabel = P80(1).Plot.XLabel; Data(5).ylabel = P80(1).Plot.YLabel; Data(5).xlim = 0.01; Data(5).title = 'OC5: Prior vs. Posterior PFM (no failures)'; P81(1) = plot_array_descr(20); % system Prior (bootstrapining) P81(2) = plot_array_descr(23); % AV1 Posterior system PFM P81(3) = plot_array_descr(28); % AV2 Posterior system PFM P81(4) = plot_array_descr(33); % AV3 Posterior system PFM P81(5) = plot_array_descr(38); % AV4 Posterior system PFM P81(6) = plot_array_descr(43); % AV5 Posterior system PFM P81(7) = plot_array_descr(47); % Vendor WB posterior system PFM Data(6).Plot = P81; Data(6).xlabel = P81(1).Plot.XLabel; Data(6).ylabel = P81(1).Plot.YLabel; Data(6).xlim = 0.01; Data(6).title = 'Prior vs. WB posterior system PFM (no failures)'; [fig_num,subplot_num] = plotting_subplots(50,Data,1,3,2); clear Data; % Now visualise the outcome of the cases with failurs (in AV3) P82(1) = plot_array_descr(1); % Conditional Prior (OC1) P82(2) = plot_array_descr(62); % AV1 Conditional Posterior (OC1) P82(3) = plot_array_descr(67); % AV2 Conditional Posterior (OC1) P82(4) = plot_array_descr(92); % AV3 Conditional Posterior (OC1) with failures P82(5) = plot_array_descr(77); % AV4 Conditional Posterior (OC1) P82(6) = plot_array_descr(82); % AV5 Conditional Posterior (OC1) P82(7) = plot_array_descr(97); % Vendor Conditional Posterior (OC1) with failures Data(1).Plot = P82; Data(1).xlabel = P82(1).Plot.XLabel; Data(1).ylabel = P82(1).Plot.YLabel; Data(1).xlim = 0.02; Data(1).title = 'OC1: Prior vs. Posterior PFM (with failures)'; P83(1) = plot_array_descr(2); % Conditional Prior (OC1) P83(2) = plot_array_descr(63); % AV1 Conditional Posterior (OC2) P83(3) = plot_array_descr(68); % AV2 Conditional Posterior (OC3) P83(4) = plot_array_descr(93); % AV3 Conditional Posterior (OC3) with failures P83(5) = plot_array_descr(78); % AV4 Conditional Posterior (OC3) P83(6) = plot_array_descr(83); % AV5 Conditional Posterior (OC3) P83(7) = plot_array_descr(98); % Vendor Conditional Posterior (OC3) with failures Data(2).Plot = P83; Data(2).xlabel = P83(1).Plot.XLabel; Data(2).ylabel = P83(1).Plot.YLabel; Data(2).xlim = 0.01; Data(2).title = 'OC2: Prior vs. Posterior PFM (with failures)'; P84(1) = plot_array_descr(3); % Conditional Prior (OC3) P84(2) = plot_array_descr(64); % AV1 Conditional Posterior (OC3) P84(3) = plot_array_descr(69); % AV2 Conditional Posterior (OC3) P84(4) = plot_array_descr(94); % AV3 Conditional Posterior (OC3) with failures P84(5) = plot_array_descr(79); % AV4 Conditional Posterior (OC3) P84(6) = plot_array_descr(84); % AV5 Conditional Posterior (OC3) P84(7) = plot_array_descr(99); % Vendor Conditional Posterior (OC3) with failures Data(3).Plot = P84; Data(3).xlabel = P84(1).Plot.XLabel; Data(3).ylabel = P84(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'OC3: Prior vs. Posterior PFM (with failures)'; P85(1) = plot_array_descr(4); % Conditional Prior (OC4) P85(2) = plot_array_descr(65); % AV1 Conditional Posterior (OC4) P85(3) = plot_array_descr(70); % AV2 Conditional Posterior (OC4) P85(4) = plot_array_descr(95); % AV3 Conditional Posterior (OC4) with failures P85(5) = plot_array_descr(80); % AV4 Conditional Posterior (OC4) P85(6) = plot_array_descr(85); % AV5 Conditional Posterior (OC4) P85(7) = plot_array_descr(100); % Vendor Conditional Posterior (OC4) with failures Data(4).Plot = P85; Data(4).xlabel = P85(1).Plot.XLabel; Data(4).ylabel = P85(1).Plot.YLabel; Data(4).xlim = 0.01; Data(4).title = 'OC4: Prior vs. Posterior PFM (with failures)'; P86(1) = plot_array_descr(5); % Conditional Prior (OC5) P86(2) = plot_array_descr(66); % AV1 Conditional Posterior (OC5) P86(3) = plot_array_descr(71); % AV2 Conditional Posterior (OC5) P86(4) = plot_array_descr(96); % AV3 Conditional Posterior (OC5) with failures P86(5) = plot_array_descr(81); % AV4 Conditional Posterior (OC5) P86(6) = plot_array_descr(86); % AV5 Conditional Posterior (OC5) P86(7) = plot_array_descr(101); % Vendor Conditional Posterior (OC5) with failures Data(5).Plot = P86; Data(5).xlabel = P86(1).Plot.XLabel; Data(5).ylabel = P86(1).Plot.YLabel; Data(5).xlim = 0.01; Data(5).title = 'OC5: Prior vs. Posterior PFM (with failures)'; P87(1) = plot_array_descr(20); % system Prior (bootstrapining) P87(2) = plot_array_descr(23); % AV1 Posterior system PFM P87(3) = plot_array_descr(28); % AV2 Posterior system PFM P87(4) = plot_array_descr(54); % AV3 Posterior system PFM (with own failures) P87(5) = plot_array_descr(38); % AV4 Posterior system PFM P87(6) = plot_array_descr(43); % AV5 Posterior system PFM P87(7) = plot_array_descr(61); % Vendor WB posterior system PFM (with failures) Data(6).Plot = P87; Data(6).xlabel = P87(1).Plot.XLabel; Data(6).ylabel = P87(1).Plot.YLabel; Data(6).xlim = 0.01; Data(6).title = 'Prior vs. WB posterior system PFM (with failures)'; [fig_num,subplot_num] = plotting_subplots(60,Data,1,3,2); clear Data; % Now plot only the prior distribution: conditional probablities of failure and the probability of system failure P90(1) = plot_array_descr(2); % Distribution of Conditional probabilities of failure OC2 P90(2) = plot_array_descr(3); % Distribution of Conditional probabilities of failure OC3 P90(3) = plot_array_descr(5); % Distribution of Conditional probabilities of failure OC5 Data(1).Plot = P90; Data(1).xlabel = P90(1).Plot.XLabel; Data(1).ylabel = P90(1).Plot.YLabel; Data(1).xlim = 0.01; Data(1).title = 'Conditional Probability of failure (in OCs)'; P91(1) = plot_array_descr(1); % % Distribution of Conditional probabilities of failure OC1 P91(2) = plot_array_descr(4); % Distribution of Conditional probabilities of failure OC4 Data(2).Plot = P91; Data(2).xlabel = P91(1).Plot.XLabel; Data(2).ylabel = P91(1).Plot.YLabel; Data(2).xlim = 0.02; Data(2).title = 'Conditional Probability of failure (in OCs)'; P92(1) = plot_array_descr(20); % % Distribution of Conditional probabilities of failure OC1 Data(3).Plot = P92; Data(3).xlabel = P92(1).Plot.XLabel; Data(3).ylabel = P92(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'Prior distribution of probability of system failure'; [fig_num,subplot_num] = plotting_subplots(70,Data,1,1,3); clear Data; P110(1) = plot_array_descr(20); % Marginal Prior AV1 P110(2) = plot_array_descr(21); % BB marginal posterior AV1 (own data) P110(3) = plot_array_descr(23); % WB marginal posterior AV1 (own data) P110(4) = plot_array_descr(48); % BB marginal posterior AV1 (fleet data, failures) P110(5) = plot_array_descr(49); % WB marginal posterior AV1 (fleet data, failures) Data(1).Plot = P110; Data(1).xlabel = P110(1).Plot.XLabel; Data(1).ylabel = P110(1).Plot.YLabel; Data(1).xlim = 0.01; Data(1).title = 'AV1: White-box vs Black-box, fleet failures'; P111(1) = plot_array_descr(30); % Marginal Prior AV3 P111(2) = plot_array_descr(52); % BB marginal posterior AV3 (own data, failure) P111(3) = plot_array_descr(53); % WB marginal posterior AV3 (own data, failures) P111(4) = plot_array_descr(54); % BB marginal posterior AV3(fleet data, failure) P111(5) = plot_array_descr(55); % WB marginal posterior AV3(failures) Data(2).Plot = P111; Data(2).xlabel = P111(1).Plot.XLabel; Data(2).ylabel = P111(1).Plot.YLabel; Data(2).xlim = 0.01; Data(2).title = 'AV3: White-box vs Black-box fleet failures'; P112(1) = plot_array_descr(45); % Marginal Prior (bootstraping) P112(2) = plot_array_descr(60); % Vendor BB marginal posterior (fleet failures). P112(3) = plot_array_descr(61); % Vendor WB marginal posterior (fleet failures) Data(3).Plot = P112; Data(3).xlabel = P112(1).Plot.XLabel; Data(3).ylabel = P112(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'Vendor: White-box vs Black-box fleet failures'; [fig_num,subplot_num] = plotting_subplots(80,Data,1,1,3); clear Data; % Aggregated (vendor) data % Plot: % - the distributions of the conditional probablities of failure (prior and % posterior (with vendor data)); % - the marginal distributions of the probability of system failure: prior % and BB/WB posterior (vendor data); P95(1) = plot_array_descr(2); % Prior Distribution of Conditional probabilities of failure OC2 P95(2) = plot_array_descr(3); % Prior Distribution of Conditional probabilities of failure OC3 P95(3) = plot_array_descr(5); % Prior Distribution of Conditional probabilities of failure OC5 P95(4) = plot_array_descr(88); % Posterior Distribution of Conditional probabilities of failure OC2 (fleet data, no failure) P95(5) = plot_array_descr(89); % Posterior Distribution of Conditional probabilities of failure OC3 (fleet data, no failure) P95(6) = plot_array_descr(91); % Posterior Distribution of Conditional probabilities of failure OC5 (fleet data, no failure) Data(1).Plot = P95; Data(1).xlabel = P95(1).Plot.XLabel; Data(1).ylabel = P95(1).Plot.YLabel; Data(1).xlim = 0.01; Data(1).title = 'Conditional Probability of failure (OC2, OC3, OC5)'; P96(1) = plot_array_descr(1); % Prior Distribution of Conditional probabilities of failure OC1 P96(2) = plot_array_descr(4); % Prior Distribution of Conditional probabilities of failure OC4 P96(3) = plot_array_descr(87); % Posterior Distribution of Conditional probabilities of failure OC1 (fleet data, no failure) P96(4) = plot_array_descr(90); % Posterior Distribution of Conditional probabilities of failure OC4 (fleet data, no failure) Data(2).Plot = P96; Data(2).xlabel = P96(1).Plot.XLabel; Data(2).ylabel = P96(1).Plot.YLabel; Data(2).xlim = 0.02; Data(2).title = 'Conditional Probability of failure (OC1, OC4)'; P97(1) = plot_array_descr(20); % Prior Distribution of marginal probability of system failure P97(2) = plot_array_descr(47); % Posterior Distribution of marginal probability of system failure (WB, fleet data, no failure) P97(3) = plot_array_descr(46); % Posterior Distribution of marginal probability of system failure (BB, fleet data, no failure) Data(3).Plot = P97; Data(3).xlabel = P97(1).Plot.XLabel; Data(3).ylabel = P97(1).Plot.YLabel; Data(3).xlim = 0.01; Data(3).title = 'Distribution of Probability of system failure'; P98(1) = plot_array_descr(2); % Prior Distribution of Conditional probabilities of failure OC2 P98(2) = plot_array_descr(3); % Prior Distribution of Conditional probabilities of failure OC3 P98(3) = plot_array_descr(5); % Prior Distribution of Conditional probabilities of failure OC5 P98(4) = plot_array_descr(98); % Posterior Distribution of Conditional probabilities of failure OC2 (fleet data, failure) P98(5) = plot_array_descr(99); % Posterior Distribution of Conditional probabilities of failure OC3 (fleet data, failure) P98(6) = plot_array_descr(101); % Posterior Distribution of Conditional probabilities of failure OC5 (fleet data, failure) Data(4).Plot = P98; Data(4).xlabel = P98(1).Plot.XLabel; Data(4).ylabel = P98(1).Plot.YLabel; Data(4).xlim = 0.01; Data(4).title = 'Conditional Probability of failure (OC2, OC3, OC5): '; P99(1) = plot_array_descr(1); % Prior Distribution of Conditional probabilities of failure OC1 P99(2) = plot_array_descr(4); % Prior Distribution of Conditional probabilities of failure OC4 P99(3) = plot_array_descr(97); % Posterior Distribution of Conditional probabilities of failure OC1 (fleet data, no failure) P99(4) = plot_array_descr(100); % Posterior Distribution of Conditional probabilities of failure OC4 (fleet data, no failure) Data(5).Plot = P99; Data(5).xlabel = P99(1).Plot.XLabel; Data(5).ylabel = P99(1).Plot.YLabel; Data(5).xlim = 0.02; Data(5).title = 'Conditional Probability of failure (OC1, OC4)'; P100(1) = plot_array_descr(20); % Prior Distribution of marginal probability of system failure P100(2) = plot_array_descr(61); % Posterior Distribution of marginal probability of system failure (WB, fleet data, failure) P100(3) = plot_array_descr(60); % Posterior Distribution of marginal probability of system failure (BB, fleet data, failure) Data(6).Plot = P100; Data(6).xlabel = P100(1).Plot.XLabel; Data(6).ylabel = P100(1).Plot.YLabel; Data(6).xlim = 0.01; Data(6).title = 'Distribution of Probability of system failure'; [fig_num,subplot_num] = plotting_subplots(90,Data,1,2,3); clear Data;