/usr/include/openturns/swig/KrigingResult_doc.i is in libopenturns-dev 1.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | %feature("docstring") OT::KrigingResult
"Kriging result.
Available constructors:
KrigingResult(*inputSample, outputSample, metaModel, residuals, relativeErrors, basis, trendCoefficients, covarianceModel, covarianceCoefficients*)
KrigingResult(*inputSample, outputSample, metaModel, residuals, relativeErrors, basis, trendCoefficients, covarianceModel, covarianceCoefficients, covarianceCholeskyFactor, covarianceHMatrix*)
Parameters
----------
inputSample, outputSample : 2-d sequence of float
The input and output samples of a model evaluated apart.
metaModel : :class:`~openturns.NumericalMathFunction`
The surrogate model built thanks to the kriging algorithm.
residuals : sequence of float
The residual errors.
relativeErrors : sequence of float
The relative errors.
basis : collection of :class:`~openturns.Basis`
Its size should be equal to the output dimension or zero if no trend is estimated.
The n-th basis is the functional basis (or the generalized linear model) for the n-th output marginal.
trendCoefficients : collection of sequence of float
The trend coeffients associated to the generalized linear model.
covarianceModel : :class:`~openturns.CovarianceModel`
Covariance function.
covarianceCoefficients : 2-d sequence of float
The covariance coefficients.
covarianceCholeskyFactor : :class:`~openturns.TriangularMatrix`
The Cholesky factor of associated to the evaluation of the covariance function evaluated at the inputSample.
covarianceHMatrix : :class:`~openturns.HMatrix`
The *hmat* implementation of the Cholesky factor of the covariance matrix obtained by the discretization of the covariance function on the input sample.
Notes
-----
The structure is usually created by the method run() of a
:class:`~openturns.KrigingAlgorithm`, and obtained thanks to the *getResult()* method.
We use the notations used for the :class:`~openturns.KrigingAlgorithm` class and the additional following ones.
.. math::
\\\\mat{F} = \\\\left(
\\\\begin{array}{lcl}
\\\\vect{f}_1(\\\\vect{x}_1) & \\\\dots & \\\\vect{f}_M(\\\\vect{x}_1) \\\\\\\\
\\\\dots & \\\\dots & \\\\\\\\
\\\\vect{f}_1(\\\\vect{x}_n) & \\\\dots & \\\\vect{f}_M(\\\\vect{x}_n)
\\\\end{array}
\\\\right)
where :math:`\\\\mat{F} \\\\in \\\\mathcal{M}_{np, M}(\\\\Rset)`.
.. math::
\\\\vect{Y} = \\\\left(
\\\\begin{array}{l}
\\\\vect{y}_1 \\\\\\\\
\\\\dots \\\\\\\\
\\\\vect{y}_n
\\\\end{array}
\\\\right) \\\\in \\\\Rset^{np}, \\\\quad
\\\\vect{Z} = \\\\left(
\\\\begin{array}{l}
\\\\vect{Y}\\\\\\\\
\\\\vect{y}
\\\\end{array}
\\\\right) \\\\in \\\\Rset^{(n+1)p}
Then :math:`\\\\vect{Z} \\\\sim \\\\mathcal{N}(\\\\vect{\\\\mu}, \\\\mat{\\\\Sigma})` where:
.. math::
\\\\mat{\\\\Sigma}_{i,j} = C(\\\\vect{x}_i,\\\\vect{x}_j) \\\\quad \\\\forall (i,j) \\\\in [1,n]
\\\\mat{\\\\Sigma}_{n+1,j} = C(\\\\vect{x},\\\\vect{x}_j) \\\\quad \\\\forall j \\\\in [1,n]
with :
.. math::
\\\\vect{\\\\mu} = \\\\left(
\\\\begin{array}{l}
\\\\mat{F}\\\\vect{\\\\beta} \\\\\\\\[1em]
\\\\displaystyle \\\\sum_{m=1}^M \\\\beta_m \\\\vect{f}_m(\\\\vect{x})
\\\\end{array}
\\\\right) \\\\in \\\\Rset^{(n+1)p}
The Kriging meta model is the conditional mean at point :math:`\\\\vect{x}` that writes:
.. math::
\\\\hat{\\\\vect{y}}(\\\\vect{x}) = \\\\Expect{\\\\vect{y}|\\\\vect{Y}} = \\\\sum_{m=1}^M \\\\beta_m \\\\vect{f}_m(\\\\vect{x}) + \\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x}) \\\\, \\\\mat{\\\\Sigma}_{1:n,1:n}^{-1}\\\\, \\\\left(\\\\vect{Y}- \\\\mat{F}\\\\vect{\\\\beta} \\\\right)
If evaluated on the sample :math:`(\\\\vect{x}_1, \\\\dots, \\\\vect{x}_h)`, the conditional mean is the sample :math:`(\\\\hat{\\\\vect{y}}(\\\\vect{x}_1), \\\\dots, \\\\hat{\\\\vect{y}}(\\\\vect{x}_h))`.
The conditional covariance at :math:`\\\\vect{x}` writes:
.. math::
\\\\Cov{\\\\vect{y}|\\\\vect{Y}} = \\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x})\\\\,\\\\mat{\\\\Sigma}_{1:n,1:n}^{-1}\\\\, \\\\Tr{\\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x})} \\\\in \\\\mathcal{M}_{p}(\\\\Rset)
If evaluated on the sample :math:`(\\\\vect{x}_1, \\\\dots, \\\\vect{x}_h)`, then the matrices :math:`(\\\\Cov{\\\\vect{y}_1|\\\\vect{Y}}, \\\\dots, \\\\Cov{\\\\vect{y}_h|\\\\vect{Y}})` are grouped within one matrix that writes:
.. math::
\\\\left(
\\\\begin{array}{c}
\\\\Cov{\\\\vect{y}_1|\\\\vect{Y}} \\\\\\\\
\\\\dots \\\\\\\\
\\\\Cov{\\\\vect{y}_h|\\\\vect{Y}}
\\\\end{array}
\\\\right) \\\\in \\\\mathcal{M}_{ph, p}(\\\\Rset)
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> sampleX = [[1.0], [2.0], [3.0], [4.0], [5.0], [6.0]]
>>> sampleY = f(sampleX)
Create the algorithm:
>>> basis = ot.Basis([ot.NumericalMathFunction('x', 'x'), ot.NumericalMathFunction('x', 'x^2')])
>>> covarianceModel = ot.GeneralizedExponential(1, 2.0, 2.0)
>>> algoKriging = ot.KrigingAlgorithm(sampleX, sampleY, basis, covarianceModel)
>>> algoKriging.run()
Get the result:
>>> resKriging = algoKriging.getResult()
Get the meta model:
>>> metaModel = resKriging.getMetaModel()
>>> graph = metaModel.draw(0.0, 7.0)
>>> cloud = ot.Cloud(sampleX, sampleY)
>>> cloud.setPointStyle('fcircle')
>>> graph.add(cloud)
>>> graph.add(f.draw(0.0, 7.0))
>>> graph.setColors(['black', 'blue', 'red'])
"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getCovarianceCoefficients
"Accessor to the covariance coefficients.
Returns
-------
covCoeff : :class:`~openturns.NumericalSample`
Returns as a sample the columns of the matrix :math:`\\\\mat{\\\\Sigma}_{1:n,1:n}^{-1}\\\\,\\\\left(\\\\vect{Y}- \\\\mat{F}\\\\vect{\\\\beta}\\\\right)`.
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the results:
>>> result = algo.getResult()
Get the covariance coefficients:
>>> covarianceCoefficients = result.getCovarianceCoefficients()
"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getTrendCoefficients
"Accessor to the coefficients of the generalized linear model of the trend.
Returns
-------
trendCoef : collection of :class:`~openturns.NumericalPoint`
For each output marginal *j*, the list of :math:`\\\\vect{\\\\beta}_j`.
If a collection of basis has been fixed by the User, the vectors :math:`\\\\vect{\\\\beta}_j` don't have the same dimension according to the output marginal *j*.
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the results:
>>> result = algo.getResult()
Get the trend coefficients:
>>> trendCoefficients = result.getTrendCoefficients()"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getCovarianceModel
"Accessor to the covariance model.
Returns
-------
covModel : :class:`~openturns.CovarianceModel`
The covariance model of the Normal process *Z*, noted :math:`C_{\\\\vect{\\\\sigma}, \\\\vect{\\\\theta}, \\\\vect{\\\\lambda}}`.
Its spatial dimension is *d* and its dimension is *p*.
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the results:
>>> result = algo.getResult()
Get the covariance model:
>>> covariance = result.getCovarianceModel()"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getBasisCollection
"Accessor to the multivariate basis of the generalized linear model.
Returns
-------
basisCollection : collection of :class:`~openturns.Basis`
Each element of this class is a :class:`~openturns.Basis` which is the functional basis (or the generalized linear model).
Notes
-----
If the trend is not estimated, the collection is empty. Otherwise, it contains a number of basis equal to the output dimension *p*.
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the results:
>>> result = algo.getResult()
>>> # Get the basis collection
Get the basis collection:
>>> basisCollection = result.getBasisCollection()"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getConditionalMean
"Compute the expected mean of the Gaussian process on a point or a sample of points.
Available usages:
getConditionalMean(x)
getConditionalMean(sampleX)
Parameters
----------
x : sequence of float
The point :math:`\\\\vect{x}` where the conditional mean of the output has to be evaluated.
sampleX : 2-d sequence of float
The sample :math:`(\\\\vect{x}_1, \\\\dots, \\\\vect{x}_h)` where the conditional mean of the output has to be evaluated (*h* can be equal to 1).
Returns
-------
condMean : :class:`~openturns.NumericalPoint`
Returns :math:`\\\\hat{\\\\vect{y}}(\\\\vect{x}) = \\\\Expect{\\\\vect{y}|\\\\vect{Y}}` (see the section Notes to get the detailed expression) or :math:`(\\\\hat{\\\\vect{y}}(\\\\vect{x}_1), \\\\dots, \\\\hat{\\\\vect{y}}(\\\\vect{x}_h))`.
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> # use of Hmat implementation
>>> # ot.ResourceMap.Set('KrigingAlgorithm-LinearAlgebra', 'HMAT')
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the conditional mean evaluated at point 0:
>>> result = algo.getResult()
>>> mu = result.getConditionalMean([0.0])"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getConditionalCovariance
"Compute the expected covariance of the Gaussian process on a point (or several points).
Available usages:
getConditionalCovariance(x)
getConditionalCovariance(sampleX)
Parameters
----------
x : sequence of float
The point :math:`\\\\vect{x}` where the conditional mean of the output has to be evaluated.
sampleX : 2-d sequence of float
The sample :math:`(\\\\vect{x}_1, \\\\dots, \\\\vect{x}_h)` where the conditional mean of the output has to be evaluated (*h* can be equal to 1).
Returns
-------
condCov : :class:`~openturns.CovarianceMatrix`
Returns: :math:`\\\\Cov{\\\\vect{y}}` or
.. math::
\\\\left(
\\\\begin{array}{c}
\\\\Cov{\\\\vect{y}_1|\\\\vect{Y}} \\\\\\\\
\\\\dots \\\\\\\\
\\\\Cov{\\\\vect{y}_h|\\\\vect{Y}}
\\\\end{array}
\\\\right) \\\\in \\\\mathcal{M}_{ph, p}(\\\\Rset)
where, for a :math:`\\\\vect{x}`:
.. math::
\\\\begin{array}{ccc}
\\\\Cov{\\\\vect{y(x)}|\\\\vect{Y}} & = & \\\\mat{\\\\Sigma}_{n+1,n+1}(\\\\vect{x})- \\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x})\\\\,\\\\mat{\\\\Sigma}_{1:n,1:n}^{-1}\\\\, \\\\Tr{\\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x})}\\\\\\\\
& - & \\\\Tr{u(\\\\vect{x})} \\\\left(\\\\Tr{F} \\\\mat{\\\\Sigma}_{1:n,1:n}^{-1} F\\\\right)^{-1} u(\\\\vect{x})
\\\\end{array}
with :math:`\\\\Cov{\\\\vect{y(x)}|\\\\vect{Y}} \\\\in \\\\mathcal{M}_{p}(\\\\Rset)`, :math:`u(\\\\vect{x})=f(\\\\vect{x})-\\\\Tr{F} \\\\mat{\\\\Sigma}_{1:n,1:n}^{-1} \\\\Tr{\\\\mat{\\\\Sigma}_{n+1,1:n}(\\\\vect{x})}`
Examples
--------
Create the model :math:`\\\\cM: \\\\Rset \\\\mapsto \\\\Rset` and the samples:
>>> import openturns as ot
>>> # use of Hmat implementation
>>> # ot.ResourceMap.Set('KrigingAlgorithm-LinearAlgebra', 'HMAT')
>>> f = ot.NumericalMathFunction(['x'], ['x * sin(x)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
Create the algorithm:
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
Get the conditional covariance matrix on a new point:
>>> result = algo.getResult()
>>> cov = result.getConditionalCovariance([0.0])"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getMetaModel
"Accessor to the metamodel.
Returns
-------
metaModel : :class:`~openturns.NumericalMathFunction`
The kriging meta model :math:`\\\\hat{\\\\vect{y}}: \\\\Rset^d \\\\mapsto \\\\Rset^p` (see the section Notes to get the detailed expression).
Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x0'], ['f0'], ['x0 * sin(x0)'])
>>> inputSample = ot.NumericalSample([[1.], [3.], [5.], [6.,], [7.], [8.]])
>>> outputSample = f(inputSample)
>>> # Create the algorithm
>>> basis = ot.ConstantBasisFactory().build()
>>> covarianceModel = ot.SquaredExponential(1)
>>> algo = ot.KrigingAlgorithm(inputSample, outputSample, basis, covarianceModel)
>>> algo.run()
>>> # Get the results
>>> result = algo.getResult()
>>> # The metamodel
>>> metaModel = result.getMetaModel()"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getInputTransformation
"Accessor to the transformation applied to normalize the input sample.
Returns
-------
transformation : :class:`~openturns.NumericalMathFunction`
The transformation that isused to normalize the input sample.
"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::getSigma2
"Accessor to the sigma2 coefficient.
Returns
-------
sigma2 : float
The variance factor.
Notes
-----
It deals with the variance scale factor such as:
.. math::
\\\\sigma^2 \\\\mat{C}
is the used covariance model.
"
// ---------------------------------------------------------------------
%feature("docstring") OT::KrigingResult::setSigma2
"Set to the sigma2.
Parameters
----------
sigma2 : float
The variance scale factor.
"
|