This file is indexed.

/usr/include/openturns/swig/GeneralizedLinearModelResult_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
%feature("docstring") OT::GeneralizedLinearModelResult
"Generalized linear model result.

Available constructors:
    GeneralizedLinearModelResult(*inputSample, outputSample, metaModel, residuals, relativeErrors, basis, trendCoefficients, covarianceModel*)

    GeneralizedLinearModelResult(*inputSample, outputSample, metaModel, residuals, relativeErrors, basis, trendCoefficients, covarianceModel, covarianceCholeskyFactor, covarianceHMatrix*)


Parameters
----------
inputSample, outputSample : :class:`~openturns.NumericalSample`
    The input and output samples of a model evaluated apart.
metaModel: :class:`~openturns.NumericalMathFunction`
    The surrogate model built thanks to :class:`~openturns.GeneralizedLinearModelAlgorithm`.
residuals: :class:`~openturns.NumericalPoint`
    The residual errors.
relativeErrors: :class:`~openturns.NumericalPoint`
    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 :class:`~openturns.NumericalPoint`
    The trend coeffients associated to the generalized linear model.
covarianceModel : :class:`~openturns.CovarianceModel`
    Covariance function.
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.GeneralizedLinearModelAlgorithm`, and obtained thanks to the *getResult()* method.
We use the notations used for the :class:`~openturns.GeneralizedLinearModelAlgorithm` class.
For a set :math:`(\\\\vect{X}, \\\\vect{Y})` such as:

.. math::
    \\\\vect{X} = \\\\left(
      \\\\begin{array}{l}
        \\\\vect{x}_1 \\\\\\\\
        \\\\dots \\\\\\\\
        \\\\vect{x}_n
       \\\\end{array}
     \\\\right) \\\\in \\\\mathcal{M}_{n, d}, \\\\quad
    \\\\vect{Y} = \\\\left(
      \\\\begin{array}{l}
        \\\\vect{y}_1 \\\\\\\\
        \\\\dots \\\\\\\\
        \\\\vect{y}_n
       \\\\end{array}
       \\\\right) \\\\in \\\\mathcal{M}_{n, p}

we recall the expression of the genrealized linear model:

.. math::
    \\\\vect{Y}(\\\\vect{x}) = \\\\vect{F}^t(\\\\vect{x}) \\\\vect{\\\\beta} + \\\\vect{Z}

where :math:`\\\\mat{F} \\\\in \\\\mathcal{M}_{np, M}(\\\\Rset)` and writes:

.. math::
    \\\\mat{F}(\\\\vect{x}) = \\\\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)

:math:`\\\\vect{\\\\beta} \\\\in \\\\mathcal{M}_{np, M}(\\\\Rset)` are the trend coefficients, estimated by a least-squares method.

Finally, :math:`\\\\vect{Z} \\\\sim \\\\mathcal{N}(0, \\\\mat{\\\\Sigma})` is a noise with:

.. math::
    \\\\mat{\\\\Sigma}_{i,j} =  C_{\\\\vect{\\\\sigma}, \\\\vect{\\\\theta}, \\\\vect{\\\\lambda}}(\\\\vect{x}_i,\\\\vect{x}_j) \\\\quad \\\\forall (i,j) \\\\in [1,n]


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)
>>> algo = ot.GeneralizedLinearModelAlgorithm(sampleX, sampleY, covarianceModel, basis)
>>> algo.run()

Get the result:

>>> result = algo.getResult()

Get the meta model:

>>> metaModel = result.getMetaModel()
>>> graph = metaModel.draw(0.0, 7.0)
>>> cloud = ot.Cloud(sampleX, sampleY)
>>> cloud.setPointStyle('fcircle')
>>> graph = ot.Graph()
>>> graph.add(cloud)
>>> graph.add(f.draw(0.0, 7.0))
>>> graph.setColors(['black', 'blue', 'red'])
"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::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.GeneralizedLinearModelAlgorithm(inputSample, outputSample, covarianceModel, basis)
>>> algo.run()

Get the results:

>>> result = algo.getResult()

Get the trend coefficients:

>>> trendCoefficients = result.getTrendCoefficients()"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::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.GeneralizedLinearModelAlgorithm(inputSample, outputSample, covarianceModel, basis)
>>> algo.run()

Get the results:

>>> result = algo.getResult()
>>> # Get the covariance model

Get the covariance model:

>>> covariance = result.getCovarianceModel()"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::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.GeneralizedLinearModelAlgorithm(inputSample, outputSample, covarianceModel, basis)
>>> algo.run()

Get the results:

>>> result = algo.getResult()
>>> # Get the basis collection

Get the basis collection:

>>> basisCollection = result.getBasisCollection()"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::getMetaModel
"Accessor to the metamodel.

Returns
-------
metaModel : :class:`~openturns.NumericalMathFunction`

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.GeneralizedLinearModelAlgorithm(inputSample, outputSample, covarianceModel, basis)
>>> algo.run()
>>> # Get the results
>>> result = algo.getResult()
>>> # The metamodel
>>> metaModel = result.getMetaModel()"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::getTransformation
"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::GeneralizedLinearModelResult::setTransformation
"Set accessor to the transformation applied to normalize the input sample.

Parameters
----------
transformation : :class:`~openturns.NumericalMathFunction`
    The transformation that should be applied to normalize the input sample.
"

// ---------------------------------------------------------------------

%feature("docstring") OT::GeneralizedLinearModelResult::getNoise
"Accessor to the underlying noise process.

Returns
-------
process : :class:`~openturns.Process`
    Returns the underlying process modeling the noise.

Notes
-----
The noise process writes:

.. math::
    \\\\cY \\\\sim \\\\cN\\\\left(0 , C_{\\\\vect{\\\\sigma}, \\\\vect{\\\\theta}, \\\\vect{\\\\lambda}} \\\\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.GeneralizedLinearModelAlgorithm(inputSample, outputSample, covarianceModel, basis)
>>> algo.run()

Get the results:

>>> result = algo.getResult()

Get the noise process:

>>> noise_process = result.getNoise()
"

// ---------------------------------------------------------------------