1%feature("docstring") OT::KrigingRandomVector 2"KrigingRandom vector, a conditioned Gaussian process. 3 4Parameters 5---------- 6krigingResult : :class:`~openturns.KrigingResult` 7 Structure that contains elements of computation of a kriging algorithm 8points : 1-d or 2-d sequence of float 9 Sequence of values defining a :class:`~openturns.Point` or a :class:`~openturns.Sample`. 10 11Notes 12----- 13KrigingRandomVector helps to create Gaussian random vector, :math:`Y: \Rset^n \mapsto \Rset^d`, with stationary covariance function :math:`\cC^{stat}: \Rset^n \mapsto \cM_{d \times d}(\Rset)`, conditionally to some observations. 14 15Let :math:`Y(x=x_1)=y_1,\cdots,Y(x=x_n)=y_n` be the observations of the Gaussian process. We assume the same Gaussian prior as in the :class:`~openturns.KrigingAlgorithm`: 16 17.. math:: 18 19 Y(\vect{x}) = \Tr{\vect{f}(\vect{x})} \vect{\beta} + Z(\vect{x}) 20 21with :math:`\Tr{\vect{f}(\vect{x})} \vect{\beta}` a general linear model, :math:`Z(\vect{x})` a zero-mean Gaussian process with a stationary autocorrelation function :math:`\cC^{stat}`: 22 23.. math:: 24 25 \mathbb{E}[Z(\vect{x}), Z(\vect{\tilde{x}})] = \sigma^2 \cC^{stat}_{\theta}(\vect{x} - \vect{\tilde{x}}) 26 27The objective is to generate realizations of the random vector :math:`Y`, on new points :math:`\vect{\tilde{x}}`, conditionally to these observations. For that purpose, :class:`~openturns.KrigingAlgorithm` build such a prior and stores results in a :class:`~openturns.KrigingResult` structure on a first step. This structure is given as input argument. 28 29Then, in a second step, both the prior and the covariance on input points :math:`\vect{\tilde{x}}`, conditionally to the previous observations, are evaluated (respectively :math:`Y(\vect{\tilde{x}})` and :math:`\cC^{stat}_{\theta}(\vect{\tilde{x}})`). 30 31Finally realizations are randomly generated by the Gaussian distribution :math:`\cN ( Y(\vect{\tilde{x}}), \cC^{stat}_{\theta}(\vect{\tilde{x}}) )` 32 33KrigingRandomVector class inherits from :class:`~openturns.UsualRandomVector`. Thus it stores the previous distribution and returns elements thanks to that distribution (realization, mean, covariance, sample...) 34 35Examples 36-------- 37Create the model :math:`\cM: \Rset \mapsto \Rset` and the samples: 38 39>>> import openturns as ot 40>>> f = ot.SymbolicFunction(['x'], ['x * sin(x)']) 41>>> sampleX = [[1.0], [2.0], [3.0], [4.0], [5.0], [6.0], [7.0], [8.0]] 42>>> sampleY = f(sampleX) 43 44Create the algorithm: 45 46>>> basis = ot.Basis([ot.SymbolicFunction(['x'], ['x']), ot.SymbolicFunction(['x'], ['x^2'])]) 47>>> covarianceModel = ot.SquaredExponential([1.0]) 48>>> covarianceModel.setActiveParameter([]) 49>>> algo = ot.KrigingAlgorithm(sampleX, sampleY, covarianceModel, basis) 50>>> algo.run() 51 52Get the results: 53 54>>> result = algo.getResult() 55>>> rvector = ot.KrigingRandomVector(result, [[0.0]]) 56 57Get a sample of the random vector: 58 59>>> sample = rvector.getSample(5)" 60 61// --------------------------------------------------------------------- 62 63%feature("docstring") OT::KrigingRandomVector::getRealization 64"Compute a realization of the conditional Gaussian process (conditional on the learning set). 65 66The realization predicts the value on the given input *points*. 67 68Returns 69------- 70realization : :class:`~openturns.Point` 71 Sequence of values of the Gaussian process. 72 73See also 74-------- 75getSample" 76 77// --------------------------------------------------------------------- 78 79%feature("docstring") OT::KrigingRandomVector::getSample 80"Compute a sample of realizations of the conditional Gaussian process (conditional on the learning set). 81 82The realization predicts the value on the given input *points*. 83 84Returns 85------- 86realizations : :class:`~openturns.Sample` 87 2-d float sequence of values of the Gaussian process. 88 89See also 90-------- 91getRealization" 92 93// --------------------------------------------------------------------- 94 95%feature("docstring") OT::KrigingRandomVector::getKrigingResult 96"Return the kriging result structure. 97 98Returns 99------- 100krigResult : :class:`~openturns.KrigingResult` 101 The structure containing the elements of a KrigingAlgorithm." 102