【灵敏度分析】应用莫里斯方法降低因素低估的风险(Matlab代码实现)

 👨‍🎓个人主页:研学社的博客 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

灵敏度分析用于估计不确定性因素对函数输出的影响。莫里斯方法有时被称为定性方法:它给出有限数量的计算的粗略估计。作为第一步,莫里斯方法可用于简化函数。它可以识别可以固定的低影响因素。

分析的函数必须是具有一个多维输入 x 的函数,x 必须表示分位数超空间中不确定性因子的值(x 的第 i 个坐标不是第 i 个因子的实际值,而是其累积分布函数的相应值)。要调整您的函数,首先通过将因子的累积分布函数的反函数应用于 x 来计算因子的实际值.

📚2 运行结果

部分代码:

%% 1) Clearing the memory
close all; % Closes the figures
clear all; % Clears the memory
clc; % Clears the command window

%% 2) Parameters : Please fill in

% Number of factors of uncertainty of the function studied :
nfac=20; 

% Maximum number of simulation runs :
% Large number = better estimation of the influence of the factors
% Recommended value : (number of factors + 1) * 10
% The algorithm will maybe exceed this value if it is considered necessary
nsim_max = 210;

% Function studied :
% Replace test_function by the name of your function. It must be a 
% function with one multidimensional input x. x must represent the values 
% of the uncertainty factors in the quantiles hyperspace (the i-th 
% coordinate of x is not the actual value of the i-th factor, but the 
% corresponding value of the cumulative distribution function of the i-th 
% factor). To adapt your function, first calculate the actual values of 
% the factors by applying the inverse of their cumulative distribution 
% function to each coordinate of x; Matlab includes such inverses: 
% mathworks.com/help/stats/icdf.html ).
studied_function = @(x)test_function(x);

%% 3) Initialization of the variables
table_outputs = []; % All the outputs of the simulations runs. One line = results around one point of the factors hyperspace. First column = output at a sampled point, second column = output after varying the first factor, etc...
table_ee = []; % All the elementary effects. One line = elementary effects at one point of the factors hyperspace. First column = elementary effect of the first factor, etc... See the relation between the outputs of the simulation run and the elementary effects.
factors_over = []; % Indexes of the factors over the limit (important factors). The elementary effects of these factors will not be calculated at the next step.
table_factors_over = []; % Factors over the limit at the different steps. n-th line = factors with no elementary effect at the n-th step = factors over the limit at the (n-1)-th step.
points=[]; % Sampled points of the factors hyperspace where the elementary effects are calculated.
n=1; % Current step.

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]阚丽娟,徐吉辉,陈玉金,宋晓博.安全性要求下系统失效概率及其灵敏度分析[J].安全与环境学报,2022,22(05):2342-2351.DOI:10.13637/j.issn.1009-6094.2021.0650.

[2]Saltelli, A., Tarantola, S., Campolongo, F., and Ratto, M. (2004). Sensitivity Analysis in Practice - A Guide to Assessing Scientific Models. Wiley.

🌈4 Matlab代码实现

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值