Skip to main content
Home
SMAC - Systems Modeling Analysis and Control

Navigation principale

  • Home
  • Modeling
  • Analysis
  • Control
  • Aerospace Benchmarks

Breadcrumb

  1. Home

Routine errapprox

Accuracy of an approximating function.

Description

This routine computes several indicators to evaluate the accuracy of a function $f:\mathbb{R}^n\rightarrow\mathbb{R}^{n_1\times n_2}$, which approximates a set of samples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ obtained for different values $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of some explanatory variables $x$. With $e_k=y_k-f(x_k)$ and $\|e(i_1,i_2)\|=\sqrt{\sum\limits_{k=1}^N e_k(i_1,i_2)^2}$, the following quantities are computed for each entry $i_1\in [1, n_1]$ and $i_2\in [1, n_2]$:

  • global relative error: relerr(i1,i2)$=\displaystyle\frac{\|e(i_1,i_2)\|}{\|y(i_1,i_2)\|}$
  • root-mean-square error: rmserr(i1,i2)$=\displaystyle\frac{\|e(i_1,i_2)\|}{\sqrt{N}}$
  • maximum local absolute error: abserr(i1,i2)$=\max\limits_{k\in [1,N]}|e_k(i_1,i_2)|$

Syntax
 

[relerr,rmserr,abserr,absind]=errapprox(Y,fdata) [relerr,rmserr,abserr,absind]=errapprox(X,Y,names,flfr)

Input arguments

XValues $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of the explanatory variables $x$ ($n\times N$ array, where X(:,k) corresponds to $x_k$).
YSamples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ ($n_1\times n_2\times N$ array where Y(:,:,k) corresponds to $y_k$ in the general case, or possibly $1\times N$ array where Y(k) corresponds to $y_k$ if $n_1=n_2=1$).
namesNames of the explanatory variables $x$ ($1\times n$ cell array of strings).
fdataValues $\left\{f(x_k)\in\mathbb{R}^{n_1\times n_2},k \in [1, N]\right\}$ of the approximating function $f$ (same size as Y).
flfrLinear fractional representation of the approximating function $f$ (GSS object if the GSS library is installed, LFR object otherwise if the LFR toolbox is installed).

Output arguments

relerrGlobal relative error for each entry ($n_1\times n_2$ array).
rmserrRoot-mean-square error for each entry ($n_1\times n_2$ array).
abserrMaximum local absolute error for each entry ($n_1\times n_2$ array).
absindIndex of the sample at which the maximum local absolute error is computed for each entry ($n_1\times n_2$ array).

See also

lsapprox
olsapprox
qpapprox
tracker
koala
plotapprox

Navigation

  • Home
  • Modeling
    • GSS library
    • LFR toolbox
    • APRICOT library
      • Download library
      • Example
      • List of routines
        • lsapprox
        • olsapprox
        • qpapprox
        • tracker
        • koala
        • errapprox
        • plotapprox
        • plosurfaces
        • plosurfs
        • plofronts
  • Analysis
  • Control
  • Aerospace Benchmarks
ONERA

Systems Control and Flight Dynamics Department
2, avenue Edouard Belin
31055 Toulouse
smac@onera.fr

Flux RSS

Menu du compte de l'utilisateur

  • Log in