Skip to content

Commit

Permalink
Added getDesign()
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudin47 committed Aug 22, 2023
1 parent 2ac5540 commit 54eda12
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ Basis LinearModelResult::getBasis() const
return basis_;
}

Matrix LinearModelResult::getDesign() const
{
return design_;
}

/* Fitted sample accessor */
Sample LinearModelResult::getFittedSample() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public:
/** Sample accessors */
virtual Basis getBasis() const;
virtual Sample getFittedSample() const;
virtual Matrix getDesign() const;

/** Condensed formula accessor */
virtual Point getCoefficients() const;
Expand Down
16 changes: 12 additions & 4 deletions python/src/LinearModelResult_doc.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ outputSample : 2-d sequence of float
The output sample of a model.
metaModel : :class:`~openturns.Function`
The meta model.
trendCoefficients : sequence of float
The trend coeffients associated to the linearmodel.
coefficients : sequence of float
The trend coefficients associated to the linear model.
formula : str
The formula description.
coefficientsNames : sequence of str
Expand Down Expand Up @@ -46,7 +46,15 @@ LinearModelAlgorithm
Returns
-------
basis : :class:`~openturns.Basis`
The basis which had been passed to the constructor."
The basis."

%feature("docstring") OT::LinearModelResult::getDesign
"Accessor to the design matrix.

Returns
-------
design: :class:`~openturns.Matrix`
The design matrix."

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

Expand All @@ -65,7 +73,7 @@ outputSample : :class:`~openturns.Sample`

Returns
-------
beta : :class:`~openturns.Point`
coefficients : :class:`~openturns.Point`
"

// ---------------------------------------------------------------------
Expand Down

0 comments on commit 54eda12

Please sign in to comment.