# Morris sensitivity analysis with vectors as output

**URL:** <https://uqworld.org/t/morris-sensitivity-analysis-with-vectors-as-output/477>\
**Category:** UQ Resources\
**Tags:** sensitivity\
**Created:** [January 29, 2020, 7:58pm UTC](https://uqworld.org/t/morris-sensitivity-analysis-with-vectors-as-output/477 "2020-01-29T19:58:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiyang](https://uqworld.org/user_avatar/uqworld.org/tiyang/32/392_2.png) [@tiyang](https://uqworld.org/u/tiyang)\
**Post date:** [January 29, 2020, 7:58pm UTC](https://uqworld.org/t/morris-sensitivity-analysis-with-vectors-as-output/477/1 "2020-01-29T19:58:18Z")

</div>

Hi there.  
I’m trying to do a sensitivity analysis with 11-dimensional inputs, and the output is a 196-dimensional binary vector. The output is obtained by taking the 11-d inputs and calling external programs to run simulation.  
What I want to do is to combine the Morris method with Hamming Distance calculation. That is, the Hamming Distance between two output vectors (again, 196-d binary vector) as a result of the input change. I don’t know if it’s possible.  
If not, is there a way to run sensitivity analysis with UQLab when the output is a 196-dimensional binary vector?  
Thank you very much.  
Tianjiao

---

<div class="post-metadata">

**Author:** ![tma974](https://uqworld.org/letter_avatar_proxy/v4/letter/t/76d3ee/32.png) [@tma974](https://uqworld.org/u/tma974)\
**Post date:** [January 30, 2020, 2:40pm UTC](https://uqworld.org/t/morris-sensitivity-analysis-with-vectors-as-output/477/2 "2020-01-30T14:40:44Z")

</div>

Hi Tianjiao,  
I can’t tell if UQLab can perform SA with your configuration. But your idea sounds very interesting. My understanding is that with the Hamming Distance you will obtain one single value per input of the Morris statistic and not 196 ones. I’ve never seen such an example before.

By the way, there is another way to conduct the analysis which will provide a set of 11x192 sensitivity indices (which might be cumbersome but at least you can guess which variable is important for each element of the output vector, if this can be of interest). Compute the delta-importance measure by comparing x\_i to x\_i\vert y\_t=0 or to x\_i\vert y\_t=1 for t=1,...,196 and i=1,...,11.  
Regards,  
Thierry

---

<div class="post-metadata">

**Author:** ![bsudret](https://uqworld.org/user_avatar/uqworld.org/bsudret/32/224_2.png) [@bsudret](https://uqworld.org/u/bsudret)\
**Post date:** [January 31, 2020, 7:43am UTC](https://uqworld.org/t/morris-sensitivity-analysis-with-vectors-as-output/477/3 "2020-01-31T07:43:01Z")

</div>

Dear Tianjiao

First of all, from a practical point of view, the vast majority of the methods available in UQLab work seamlessly when the model has a vector of outputs. You have nothing to do!  
So if you apply the method of Morris to a model with 196 outputs, you’ll get 196 different (\mu,\,\sigma) diagrams. Same if you use Sobol’ indices: you’ll get a matrix of first-order indices, a matrix of total indices, etc.  
Now this usually applies to _continuous_ outputs. And I guess it does not necessarily make sense to perform a sensitivity analysis with each 0/1 output in your case. If so, the approach proposed by Thierry would work. Otherwise, you can compute the Hamming distance with the null vector (Hamming weight) and use it as a single scalar output.  
Hope it is useful!  
Best regards  
Bruno
