SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

 deprecated ("the float32 version of LOESS is deprecated due to low precision. Use float64 version.") LOESSResult< D
 
float32 loess (D int32[[1]] x, D int32[[1]] y, float64 span, float32 xmin, float32 xmax, uint xpoints, uint degree)
 
template<domain D :shared3p >
LOESSResult< D, float64 > loess (D int64[[1]] x, D int64[[1]] y, float64 span, float64 xmin, float64 xmax, uint xpoints, uint degree)
 
float32 loess (D float32[[1]] x, D float32[[1]] y, float64 span, float32 xmin, float32 xmax, uint xpoints, uint degree)
 
template<domain D :shared3p >
LOESSResult< D, float64 > loess (D float64[[1]] x, D float64[[1]] y, float64 span, float64 xmin, float64 xmax, uint xpoints, uint degree)
 

Detailed Description

LOESS regression with linear local regression.

Note
This implementation of LOESS only supports linear local regression with one explanatory variable. Robust regression is not supported so it might not work well in the case of outliers. Unlike most software you must specify the x-axis values where regressions are evaluated using xmin, xmax and xpoints arguments.
D - shared3p protection domain
Parameters
x- x-axis values
y- y-axis values
span- fraction of points used for each local regression
xmin- smallest x-axis value where a local model is fitted
xmax- largest x-axis value where a local model is fitted
xpoints- number of regressions desired
degree- degree of local regression polynomial (1 or 2)
Returns
returns LOESSResult structure
Leakage
None

Function Documentation

◆ deprecated()

deprecated ( "the float32 version of LOESS is deprecated due to low precision. Use float64 version."  )

◆ loess() [1/4]

float32 loess ( D float32[[1]]  x,
D float32[[1]]  y,
float64  span,
float32  xmin,
float32  xmax,
uint  xpoints,
uint  degree 
)

◆ loess() [2/4]

LOESSResult<D, float64> loess ( D float64[[1]]  x,
D float64[[1]]  y,
float64  span,
float64  xmin,
float64  xmax,
uint  xpoints,
uint  degree 
)

◆ loess() [3/4]

float32 loess ( D int32[[1]]  x,
D int32[[1]]  y,
float64  span,
float32  xmin,
float32  xmax,
uint  xpoints,
uint  degree 
)

◆ loess() [4/4]

LOESSResult<D, float64> loess ( D int64[[1]]  x,
D int64[[1]]  y,
float64  span,
float64  xmin,
float64  xmax,
uint  xpoints,
uint  degree 
)