# Python usage

**URL:** https://openturns.discourse.group/c/python/9.md?page=1

[Latest](https://openturns.discourse.group/latest.md) · [Categories](https://openturns.discourse.group/categories.md) · [Tags](https://openturns.discourse.group/tags.md)

**Page:** 2

---

## [Use Kriging as forward model in Bayesian calibration](https://openturns.discourse.group/t/use-kriging-as-forward-model-in-bayesian-calibration/262)

<div class="topic-metadata">

**Author:** [@elieso](https://openturns.discourse.group/u/elieso)\
**Replies:** 15\
**Last updated:** [August 25, 2023, 9:54am UTC](https://openturns.discourse.group/t/use-kriging-as-forward-model-in-bayesian-calibration/262 "2023-08-25T09:54:02Z")

</div>

Hi all, I am a new user to OpenTURNS but familiar with UQ topics, especially Kriging and Bayesian Calibration through the use of MCMC algorithms. I am trying to set up a Bayesian calibration problem and use a Kriging m…

---

## [Hyperparameters in UserDefinedCovarianceModel](https://openturns.discourse.group/t/hyperparameters-in-userdefinedcovariancemodel/314)

<div class="topic-metadata">

**Author:** [@smollie37](https://openturns.discourse.group/u/smollie37)\
**Replies:** 2\
**Last updated:** [August 21, 2023, 1:30pm UTC](https://openturns.discourse.group/t/hyperparameters-in-userdefinedcovariancemodel/314 "2023-08-21T13:30:35Z")

</div>

Hello, I’ve been using Openturns for the last two-three weeks to develop some Kriging models for my thesis. I was wondering if it is possible to put in hyperparamaters (that are optimized) into an “UserDefinedCovarianceM…

---

## [Using the HMatrix class directly](https://openturns.discourse.group/t/using-the-hmatrix-class-directly/304)

<div class="topic-metadata">

**Author:** [@JPelamatti](https://openturns.discourse.group/u/JPelamatti)\
**Replies:** 3\
**Last updated:** [July 18, 2023, 11:52am UTC](https://openturns.discourse.group/t/using-the-hmatrix-class-directly/304 "2023-07-18T11:52:43Z")

</div>

Hi there, I was wondering whether it is possible to use the results of an HMatrix factorization of a covariance model in order to perform linear algebra computations (e.g., product and sum between HMat covariance matric…

---

## [Contour plots using Matplotlib](https://openturns.discourse.group/t/contour-plots-using-matplotlib/272)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 2\
**Last updated:** [July 8, 2023, 2:23pm UTC](https://openturns.discourse.group/t/contour-plots-using-matplotlib/272 "2023-07-08T14:23:45Z")

</div>

Hello! I sometimes have to create contour plots e.g. when performing optimization using OpenTURNS. If g is a Function with 2 inputs and 1 output, the draw() method of any function can plot contours (i.e. iso-values plot…

---

## [OpenTURNS in real HPC setup](https://openturns.discourse.group/t/openturns-in-real-hpc-setup/247)

<div class="topic-metadata">

**Author:** [@imilos](https://openturns.discourse.group/u/imilos)\
**Replies:** 10\
**Last updated:** [July 3, 2023, 6:38am UTC](https://openturns.discourse.group/t/openturns-in-real-hpc-setup/247 "2023-07-03T06:38:47Z")

</div>

Does anyone have experience in running OpenTURNS in an HPC cluster setup for larger-scale distributed evaluations? For example, using a batching system such as SLURM/PBS with otwrapper PyCOMPSs or a similar library? Any…

---

## [How to reuse Random forest Classifier from Otpod Adaptive Hit miss method?](https://openturns.discourse.group/t/how-to-reuse-random-forest-classifier-from-otpod-adaptive-hit-miss-method/298)

<div class="topic-metadata">

**Author:** [@gblondet](https://openturns.discourse.group/u/gblondet)\
**Replies:** 2\
**Last updated:** [June 13, 2023, 1:43pm UTC](https://openturns.discourse.group/t/how-to-reuse-random-forest-classifier-from-otpod-adaptive-hit-miss-method/298 "2023-06-13T13:43:08Z")

</div>

Good afternoon, I am working with otpod to estimate POD with the Adaptive Hit-Miss method. I did not manage to reuse the classifier to compute confusion matrix. Of course, there is a method to compute confusion matrix d…

---

## [Construct conditional distribution and transform the jointly distribution](https://openturns.discourse.group/t/construct-conditional-distribution-and-transform-the-jointly-distribution/294)

<div class="topic-metadata">

**Author:** [@Wissen](https://openturns.discourse.group/u/Wissen)\
**Replies:** 3\
**Last updated:** [June 10, 2023, 12:43pm UTC](https://openturns.discourse.group/t/construct-conditional-distribution-and-transform-the-jointly-distribution/294 "2023-06-10T12:43:13Z")

</div>

Hello, I’m building a stochastic model with three random variables X,Y, Z that both X, Y depends on Z and X, Y are conditional independent given the value of Z. I wonder that how can I implement the conditional distribu…

---

## [Plotting error, grid\_b](https://openturns.discourse.group/t/plotting-error-grid-b/291)

<div class="topic-metadata">

**Author:** [@PhilippIce](https://openturns.discourse.group/u/PhilippIce)\
**Replies:** 2\
**Last updated:** [May 30, 2023, 7:40am UTC](https://openturns.discourse.group/t/plotting-error-grid-b/291 "2023-05-30T07:40:49Z")

</div>

Hey Everybody, Thanks for the awesome software. I seem to be running into a bug with incompatible versions of the software. I am running openturns version 1.20.post3 and matplotlib 3.7.1. When I am trying to plot som…

---

## [Error defining a ComposedDistribution](https://openturns.discourse.group/t/error-defining-a-composeddistribution/288)

<div class="topic-metadata">

**Author:** [@lucelorr](https://openturns.discourse.group/u/lucelorr)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 8:55am UTC](https://openturns.discourse.group/t/error-defining-a-composeddistribution/288 "2023-05-17T08:55:11Z")

</div>

Hi, I have obtained an error in this code. Could someone help me with this error? Thanks in advanced print(range(0,len(GR\_VD))) for id\_sec in range(len(GR\_VD)): l\_media = ANGLES\[GR\_VD\[id\_sec\]-1\]\[1\] \* mm VectorX.appe…

---

## [Convert a Matrix into a Sample](https://openturns.discourse.group/t/convert-a-matrix-into-a-sample/284)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 0\
**Last updated:** [April 27, 2023, 4:24pm UTC](https://openturns.discourse.group/t/convert-a-matrix-into-a-sample/284 "2023-04-27T16:24:25Z")

</div>

Hi ! I have to convert a Matrix into a Sample. So I wrote: import openturns as ot matrix = ot.Matrix(\[\[1.0, 2.0\], \[3.0, 4.0\], \[5.0, 6.0\]\]) sample = ot.Sample(matrix) # Fails ! but this produces: TypeError: InvalidAr…

---

## [Provide directly the isoprobabilistic transformation during FORM](https://openturns.discourse.group/t/provide-directly-the-isoprobabilistic-transformation-during-form/271)

<div class="topic-metadata">

**Author:** [@Alexis](https://openturns.discourse.group/u/Alexis)\
**Replies:** 2\
**Last updated:** [February 23, 2023, 3:03pm UTC](https://openturns.discourse.group/t/provide-directly-the-isoprobabilistic-transformation-during-form/271 "2023-02-23T15:03:16Z")

</div>

Hi, Is it possible to directly provide the isoprobabilistic transformation using FORM instead of defining the distribution and letting Openturns estimates the isoprobabilistic transformation? Thanks, Alexis

---

## [Output value for OpenTURNSPythonFunction.\_exec\_sample() method is not a 2d-sequence object](https://openturns.discourse.group/t/output-value-for-openturnspythonfunction-exec-sample-method-is-not-a-2d-sequence-object/193)

<div class="topic-metadata">

**Author:** [@lucelorr](https://openturns.discourse.group/u/lucelorr)\
**Replies:** 2\
**Last updated:** [March 21, 2022, 12:49pm UTC](https://openturns.discourse.group/t/output-value-for-openturnspythonfunction-exec-sample-method-is-not-a-2d-sequence-object/193 "2022-03-21T12:49:22Z")

</div>

Hi, all I have obtained the error: Output value for OpenTURNSPythonFunction.\_exec\_sample() method is not a 2d-sequence object This error came from simulation.py file. However, I do not know how to read this file …

---

## [Impossible to install the package using pip](https://openturns.discourse.group/t/impossible-to-install-the-package-using-pip/267)

<div class="topic-metadata">

**Author:** [@JEanv](https://openturns.discourse.group/u/JEanv)\
**Replies:** 1\
**Last updated:** [February 2, 2023, 4:34pm UTC](https://openturns.discourse.group/t/impossible-to-install-the-package-using-pip/267 "2023-02-02T16:34:46Z")

</div>

Hello, I am using python 3.11.0 and when use the following command : pip3 install openturns I get the following error message : ERROR: Could not find a version that satisfies the requirement openturns (from versions:…

---

## [Apply log to sample columns](https://openturns.discourse.group/t/apply-log-to-sample-columns/263)

<div class="topic-metadata">

**Author:** [@Claire-Eleutheriane](https://openturns.discourse.group/u/Claire-Eleutheriane)\
**Replies:** 2\
**Last updated:** [January 11, 2023, 10:49am UTC](https://openturns.discourse.group/t/apply-log-to-sample-columns/263 "2023-01-11T10:49:56Z")

</div>

Hi, I want to apply a log transformation to some columns of a sample. Is there a direct way to do this (in-place if possible)? In pandas, this would be: df\[list\_log\_input\] = np.log(df\[list\_log\_input\]) Thanks :+1:

---

## [Is it possible to compose a copula of multiple variables where a single variable is dependent on multiple other variables?](https://openturns.discourse.group/t/is-it-possible-to-compose-a-copula-of-multiple-variables-where-a-single-variable-is-dependent-on-multiple-other-variables/259)

<div class="topic-metadata">

**Author:** [@woest](https://openturns.discourse.group/u/woest)\
**Replies:** 4\
**Last updated:** [January 10, 2023, 2:24pm UTC](https://openturns.discourse.group/t/is-it-possible-to-compose-a-copula-of-multiple-variables-where-a-single-variable-is-dependent-on-multiple-other-variables/259 "2023-01-10T14:24:19Z")

</div>

Suppose I have 3 variables x1, x2, x3. x1 and x2 are correlated by means of gumbel copula. x1 and x3 are correlated by means of another gumbel copula. x2 is independent of x1 and x3. (my actual case has 2 more variables…

---

## [How to create a weibullgpd distribution?](https://openturns.discourse.group/t/how-to-create-a-weibullgpd-distribution/250)

<div class="topic-metadata">

**Author:** [@Alexis](https://openturns.discourse.group/u/Alexis)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 1:41pm UTC](https://openturns.discourse.group/t/how-to-create-a-weibullgpd-distribution/250 "2022-11-17T13:41:38Z")

</div>

Hello, I want to create a weibullgpd distribution as defined (for R) on the website weibullgpd function - RDocumentation. Is it possible to do it with OpenTURNS ? If so, can you tell me how please ? Thank you, Alexis …

---

## [Input-dependent discrepancies between Monte Carlo vs FORM probabilities](https://openturns.discourse.group/t/input-dependent-discrepancies-between-monte-carlo-vs-form-probabilities/225)

<div class="topic-metadata">

**Author:** [@philemon-cyclone](https://openturns.discourse.group/u/philemon-cyclone)\
**Replies:** 3\
**Last updated:** [October 16, 2022, 12:59pm UTC](https://openturns.discourse.group/t/input-dependent-discrepancies-between-monte-carlo-vs-form-probabilities/225 "2022-10-16T12:59:34Z")

</div>

I am performing a sensitivity analysis for probabilities of failure (POFs) using FORM and standard Monte Carlo sampling, and have noticed a significant discrepancy when the POFs drop below approximately 1e-4, the FORM an…

---

## [Predict new value POD Summary](https://openturns.discourse.group/t/predict-new-value-pod-summary/244)

<div class="topic-metadata">

**Author:** [@cnkhanh](https://openturns.discourse.group/u/cnkhanh)\
**Replies:** 0\
**Last updated:** [September 30, 2022, 6:01am UTC](https://openturns.discourse.group/t/predict-new-value-pod-summary/244 "2022-09-30T06:01:16Z")

</div>

I trained the models as this example https://openturns.github.io/otpod/master/examples/PODSummary.html In case, I turned on all the POD methods, the results of “POD.getMethodActive()” should be like the below: {'Linea…

---

## [Using Kriging POD model](https://openturns.discourse.group/t/using-kriging-pod-model/241)

<div class="topic-metadata">

**Author:** [@cnkhanh](https://openturns.discourse.group/u/cnkhanh)\
**Replies:** 6\
**Last updated:** [September 30, 2022, 4:48am UTC](https://openturns.discourse.group/t/using-kriging-pod-model/241 "2022-09-30T04:48:07Z")

</div>

After run the Kriging POD model as in this example https://openturns.github.io/otpod/master/examples/krigingPOD.html How to save the model? Can I use this model to estimate the output value for new inputs? For example,…

---

## [StationaryCovarianceFactory is yielding an non positive covariance matrix](https://openturns.discourse.group/t/stationarycovariancefactory-is-yielding-an-non-positive-covariance-matrix/217)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [September 27, 2022, 1:52pm UTC](https://openturns.discourse.group/t/stationarycovariancefactory-is-yielding-an-non-positive-covariance-matrix/217 "2022-09-27T13:52:13Z")

</div>

hello, I’ve tried using the ot.StationaryCovarianceModelFactory class in order to estimate a covariance matrix over a given time series. i’ve been experiencing some problems afterwards bc the obtained matrix is not nece…

---

## [FunctionalChaosAlgorithm with your own orthonormal basis construction](https://openturns.discourse.group/t/functionalchaosalgorithm-with-your-own-orthonormal-basis-construction/143)

<div class="topic-metadata">

**Author:** [@lcoelho](https://openturns.discourse.group/u/lcoelho)\
**Replies:** 2\
**Last updated:** [September 15, 2022, 1:29pm UTC](https://openturns.discourse.group/t/functionalchaosalgorithm-with-your-own-orthonormal-basis-construction/143 "2022-09-15T13:29:42Z")

</div>

Hi, Using ot.FunctionalChaosAlgorithm(), I would like to know if it’s possible to give your own construction of the orthonormal basis in the AdaptativeStrategy(). Best, Ludovic

---

## [Karhunen Loeve 2D random SVD algorithm](https://openturns.discourse.group/t/karhunen-loeve-2d-random-svd-algorithm/231)

<div class="topic-metadata">

**Author:** [@selim.ollivier](https://openturns.discourse.group/u/selim.ollivier)\
**Replies:** 1\
**Last updated:** [July 10, 2022, 2:55pm UTC](https://openturns.discourse.group/t/karhunen-loeve-2d-random-svd-algorithm/231 "2022-07-10T14:55:06Z")

</div>

Hello everybody, I am working with 2D images and I aim to perform a Karhunen-Loeve decomposition to reduce the dimension of my data. As my images do not have the same dimensions and meshes, I have performed interpolatio…

---

## [Observations errors or values have no effect on posterior's variance?](https://openturns.discourse.group/t/observations-errors-or-values-have-no-effect-on-posteriors-variance/226)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [July 8, 2022, 7:17am UTC](https://openturns.discourse.group/t/observations-errors-or-values-have-no-effect-on-posteriors-variance/226 "2022-07-08T07:17:17Z")

</div>

hello, i’ve tried running the official code (GaussianLinearCalibration — OpenTURNS 1.19 documentation) documenting Linear Gaussian Calibration. When i change the observed values, for instance by replacing the observed v…

---

## [Options to draw graph for HSIC](https://openturns.discourse.group/t/options-to-draw-graph-for-hsic/218)

<div class="topic-metadata">

**Author:** [@Flore](https://openturns.discourse.group/u/Flore)\
**Replies:** 2\
**Last updated:** [June 28, 2022, 3:02pm UTC](https://openturns.discourse.group/t/options-to-draw-graph-for-hsic/218 "2022-06-28T15:02:46Z")

</div>

Hello everybody I begin to use HSIC modul with openturns I would like to know if it is possible to change the input parameters flags on graph By default it is ‘X1’, ‘X2’ etc But in my case input parameter numerotatio…

---

## [Quality of student parameter estimation](https://openturns.discourse.group/t/quality-of-student-parameter-estimation/214)

<div class="topic-metadata">

**Author:** [@AlainK](https://openturns.discourse.group/u/AlainK)\
**Replies:** 2\
**Last updated:** [June 22, 2022, 5:28am UTC](https://openturns.discourse.group/t/quality-of-student-parameter-estimation/214 "2022-06-22T05:28:11Z")

</div>

Dear developers, I was trying to improve my estimation of a Student distribution from the scipy.stats method but found out that my use of OpenTURNS was way worse. So worse that I fear I made an huge mistake in using Ope…

---

## [Data-given linear sensitivity analysis?](https://openturns.discourse.group/t/data-given-linear-sensitivity-analysis/211)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 2\
**Last updated:** [June 20, 2022, 8:41am UTC](https://openturns.discourse.group/t/data-given-linear-sensitivity-analysis/211 "2022-06-20T08:41:54Z")

</div>

Hi all, During the development of PR 2056, we discussed the implementation of regression coefficients in the library. The PR suggests to convert CorrelationAnalysis to a class. The topic of the current post is to analyz…

---

## [Minor feedback on covariance matrixes in a calibration context](https://openturns.discourse.group/t/minor-feedback-on-covariance-matrixes-in-a-calibration-context/209)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 6:35am UTC](https://openturns.discourse.group/t/minor-feedback-on-covariance-matrixes-in-a-calibration-context/209 "2022-06-08T06:35:37Z")

</div>

Hello, I have noticed that feeding a calibration algorithm a prior covariance or an observation covariance matrix in the following fashion: ot.CovarianceMatrix(22)\*2 will lead to a type error. OpenTURNS demands that t…

---

## [Possible evaluation of Sobol indices directly from the FunctionalChaosAlgorithm?](https://openturns.discourse.group/t/possible-evaluation-of-sobol-indices-directly-from-the-functionalchaosalgorithm/207)

<div class="topic-metadata">

**Author:** [@SarahIaquinta](https://openturns.discourse.group/u/SarahIaquinta)\
**Replies:** 2\
**Last updated:** [May 11, 2022, 11:58am UTC](https://openturns.discourse.group/t/possible-evaluation-of-sobol-indices-directly-from-the-functionalchaosalgorithm/207 "2022-05-11T11:58:16Z")

</div>

Hello, Is there a way to compute the Sobol indices directly from the FunctionalChaosAlgorithm class? Regards, Sarah

---

## [Calibration with noisy input parameters](https://openturns.discourse.group/t/calibration-with-noisy-input-parameters/197)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 4\
**Last updated:** [April 11, 2022, 1:00pm UTC](https://openturns.discourse.group/t/calibration-with-noisy-input-parameters/197 "2022-04-11T13:00:08Z")

</div>

hello, is it possible in OT to calibrate a model having inputs that are tainted with uncertainty but are not to be estimated ? for instance, you could imagine calibrating the Chaboche model , but with an aleatory uncer…

---

## [Calibration with noisy data](https://openturns.discourse.group/t/calibration-with-noisy-data/195)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 9:26am UTC](https://openturns.discourse.group/t/calibration-with-noisy-data/195 "2022-03-28T09:26:31Z")

</div>

Hello, could anyone enlighten me as to what setObservationsError method in the calibration context does ? i would like to calibrate a model whose observations are tainted with measurement error, and i do have a way for …

[Previous page](https://openturns.discourse.group/c/python/9.md)

[Next page](https://openturns.discourse.group/c/python/9.md?page=2)
